import java.io.*;

public class Main{
    public static void main(String[] args){
    	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    	
    	try{
    		int keta;
	    	double num[] = new double[2];
    	   	String str[] = new String[200];

    		str[0] = br.readLine();
    		int i = 0;
    		while(str[i] != null){
    			i++;
    			str[i] = br.readLine();
	    	}
	    	br.close();

    		for (int j=0;j<i;j++){
	    		String str2[] = str[j].split(" ",0);
	    		num[0] = Double.parseDouble(str2[0]);
	    		num[1] = Double.parseDouble(str2[1]);

	    		keta = (int)Math.log10(num[0]+num[1]);
    			System.out.println(keta+1);

    			if(num[0]+num[1]==0){
    				break;
    			}
    		}
   		}catch(IOException e){
   			System.out.println("fail.");
 	  	}
	}
} import java.io.*; io.* java public class Main{
    public static void main(String[] args){
    	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    	
    	try{
    		int keta;
	    	double num[] = new double[2];
    	   	String str[] = new String[200];

    		str[0] = br.readLine();
    		int i = 0;
    		while(str[i] != null){
    			i++;
    			str[i] = br.readLine();
	    	}
	    	br.close();

    		for (int j=0;j<i;j++){
	    		String str2[] = str[j].split(" ",0);
	    		num[0] = Double.parseDouble(str2[0]);
	    		num[1] = Double.parseDouble(str2[1]);

	    		keta = (int)Math.log10(num[0]+num[1]);
    			System.out.println(keta+1);

    			if(num[0]+num[1]==0){
    				break;
    			}
    		}
   		}catch(IOException e){
   			System.out.println("fail.");
 	  	}
	}
} Main public static void main(String[] args){
    	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    	
    	try{
    		int keta;
	    	double num[] = new double[2];
    	   	String str[] = new String[200];

    		str[0] = br.readLine();
    		int i = 0;
    		while(str[i] != null){
    			i++;
    			str[i] = br.readLine();
	    	}
	    	br.close();

    		for (int j=0;j<i;j++){
	    		String str2[] = str[j].split(" ",0);
	    		num[0] = Double.parseDouble(str2[0]);
	    		num[1] = Double.parseDouble(str2[1]);

	    		keta = (int)Math.log10(num[0]+num[1]);
    			System.out.println(keta+1);

    			if(num[0]+num[1]==0){
    				break;
    			}
    		}
   		}catch(IOException e){
   			System.out.println("fail.");
 	  	}
	} main {
    	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    	
    	try{
    		int keta;
	    	double num[] = new double[2];
    	   	String str[] = new String[200];

    		str[0] = br.readLine();
    		int i = 0;
    		while(str[i] != null){
    			i++;
    			str[i] = br.readLine();
	    	}
	    	br.close();

    		for (int j=0;j<i;j++){
	    		String str2[] = str[j].split(" ",0);
	    		num[0] = Double.parseDouble(str2[0]);
	    		num[1] = Double.parseDouble(str2[1]);

	    		keta = (int)Math.log10(num[0]+num[1]);
    			System.out.println(keta+1);

    			if(num[0]+num[1]==0){
    				break;
    			}
    		}
   		}catch(IOException e){
   			System.out.println("fail.");
 	  	}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) try{
    		int keta;
	    	double num[] = new double[2];
    	   	String str[] = new String[200];

    		str[0] = br.readLine();
    		int i = 0;
    		while(str[i] != null){
    			i++;
    			str[i] = br.readLine();
	    	}
	    	br.close();

    		for (int j=0;j<i;j++){
	    		String str2[] = str[j].split(" ",0);
	    		num[0] = Double.parseDouble(str2[0]);
	    		num[1] = Double.parseDouble(str2[1]);

	    		keta = (int)Math.log10(num[0]+num[1]);
    			System.out.println(keta+1);

    			if(num[0]+num[1]==0){
    				break;
    			}
    		}
   		}catch(IOException e){
   			System.out.println("fail.");
 	  	} catch(IOException e){
   			System.out.println("fail.");
 	  	} IOException e {
   			System.out.println("fail.");
 	  	} System.out.println("fail.") System.out.println System.out System System.out "fail." {
    		int keta;
	    	double num[] = new double[2];
    	   	String str[] = new String[200];

    		str[0] = br.readLine();
    		int i = 0;
    		while(str[i] != null){
    			i++;
    			str[i] = br.readLine();
	    	}
	    	br.close();

    		for (int j=0;j<i;j++){
	    		String str2[] = str[j].split(" ",0);
	    		num[0] = Double.parseDouble(str2[0]);
	    		num[1] = Double.parseDouble(str2[1]);

	    		keta = (int)Math.log10(num[0]+num[1]);
    			System.out.println(keta+1);

    			if(num[0]+num[1]==0){
    				break;
    			}
    		}
   		} int keta; keta double num[] = new double[2]; num new double[2] 2 String str[] = new String[200]; str new String[200] 200 str[0] = br.readLine() str[0] str 0 br.readLine() br.readLine br int i = 0; i 0 while(str[i] != null){
    			i++;
    			str[i] = br.readLine();
	    	} str[i] != null str[i] str i null {
    			i++;
    			str[i] = br.readLine();
	    	} i++ i str[i] = br.readLine() str[i] str i br.readLine() br.readLine br br.close() br.close br for (int j=0;j<i;j++){
	    		String str2[] = str[j].split(" ",0);
	    		num[0] = Double.parseDouble(str2[0]);
	    		num[1] = Double.parseDouble(str2[1]);

	    		keta = (int)Math.log10(num[0]+num[1]);
    			System.out.println(keta+1);

    			if(num[0]+num[1]==0){
    				break;
    			}
    		} int j=0; int j=0; j 0 j<i j i j++ j++ j {
	    		String str2[] = str[j].split(" ",0);
	    		num[0] = Double.parseDouble(str2[0]);
	    		num[1] = Double.parseDouble(str2[1]);

	    		keta = (int)Math.log10(num[0]+num[1]);
    			System.out.println(keta+1);

    			if(num[0]+num[1]==0){
    				break;
    			}
    		} {
	    		String str2[] = str[j].split(" ",0);
	    		num[0] = Double.parseDouble(str2[0]);
	    		num[1] = Double.parseDouble(str2[1]);

	    		keta = (int)Math.log10(num[0]+num[1]);
    			System.out.println(keta+1);

    			if(num[0]+num[1]==0){
    				break;
    			}
    		} String str2[] = str[j].split(" ",0); str2 str[j].split(" ",0) str[j].split str[j] str j " " 0 num[0] = Double.parseDouble(str2[0]) num[0] num 0 Double.parseDouble(str2[0]) Double.parseDouble Double str2[0] str2 0 num[1] = Double.parseDouble(str2[1]) num[1] num 1 Double.parseDouble(str2[1]) Double.parseDouble Double str2[1] str2 1 keta = (int)Math.log10(num[0]+num[1]) keta (int)Math.log10(num[0]+num[1]) Math.log10 Math num[0]+num[1] num[0] num 0 num[1] num 1 System.out.println(keta+1) System.out.println System.out System System.out keta+1 keta 1 if(num[0]+num[1]==0){
    				break;
    			} num[0]+num[1]==0 num[0]+num[1] num[0] num 0 num[1] num 1 0 {
    				break;
    			} break; String[] args args public class Main{
    public static void main(String[] args){
    	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    	
    	try{
    		int keta;
	    	double num[] = new double[2];
    	   	String str[] = new String[200];

    		str[0] = br.readLine();
    		int i = 0;
    		while(str[i] != null){
    			i++;
    			str[i] = br.readLine();
	    	}
	    	br.close();

    		for (int j=0;j<i;j++){
	    		String str2[] = str[j].split(" ",0);
	    		num[0] = Double.parseDouble(str2[0]);
	    		num[1] = Double.parseDouble(str2[1]);

	    		keta = (int)Math.log10(num[0]+num[1]);
    			System.out.println(keta+1);

    			if(num[0]+num[1]==0){
    				break;
    			}
    		}
   		}catch(IOException e){
   			System.out.println("fail.");
 	  	}
	}
} public class Main{
    public static void main(String[] args){
    	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    	
    	try{
    		int keta;
	    	double num[] = new double[2];
    	   	String str[] = new String[200];

    		str[0] = br.readLine();
    		int i = 0;
    		while(str[i] != null){
    			i++;
    			str[i] = br.readLine();
	    	}
	    	br.close();

    		for (int j=0;j<i;j++){
	    		String str2[] = str[j].split(" ",0);
	    		num[0] = Double.parseDouble(str2[0]);
	    		num[1] = Double.parseDouble(str2[1]);

	    		keta = (int)Math.log10(num[0]+num[1]);
    			System.out.println(keta+1);

    			if(num[0]+num[1]==0){
    				break;
    			}
    		}
   		}catch(IOException e){
   			System.out.println("fail.");
 	  	}
	}
} Main
import java.io.*;

public class Main{
    public static void main(String[] args){
    	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    	
    	try{
    		int keta;
	    	double num[] = new double[2];
    	   	String str[] = new String[200];

    		str[0] = br.readLine();
    		int i = 0;
    		while(str[i] != null){
    			i++;
    			str[i] = br.readLine();
	    	}
	    	br.close();

    		for (int j=0;j<i;j++){
	    		String str2[] = str[j].split(" ",0);
	    		num[0] = Double.parseDouble(str2[0]);
	    		num[1] = Double.parseDouble(str2[1]);

	    		keta = (int)Math.log10(num[0]+num[1]);
    			System.out.println(keta+1);

    			if(num[0]+num[1]==0){
    				break;
    			}
    		}
   		}catch(IOException e){
   			System.out.println("fail.");
 	  	}
	}
}
