import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws IOException{
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String str;
		int a,b;
		while((str=in.readLine())!=null){
			a=getA(str);
			b=getB(str);
			System.out.println(countDigit(a+b));
		}
		
	}
	
	public static int getA(String str){
		int index,num;
		index = str.indexOf(" ");
		num=Integer.parseInt(str.substring(0,index));
		return num;
	}
	
	public static int getB(String str){
		int index,num;
		index = str.indexOf(" ");
		num=Integer.parseInt(str.substring(index+1));
		return num;
	}
	
	public static int countDigit(int num){
		int dig=1;
		while(num>=10){
			num=num/10;
			dig++;
		}		
		return dig;
	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	public static void main(String[] args) throws IOException{
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String str;
		int a,b;
		while((str=in.readLine())!=null){
			a=getA(str);
			b=getB(str);
			System.out.println(countDigit(a+b));
		}
		
	}
	
	public static int getA(String str){
		int index,num;
		index = str.indexOf(" ");
		num=Integer.parseInt(str.substring(0,index));
		return num;
	}
	
	public static int getB(String str){
		int index,num;
		index = str.indexOf(" ");
		num=Integer.parseInt(str.substring(index+1));
		return num;
	}
	
	public static int countDigit(int num){
		int dig=1;
		while(num>=10){
			num=num/10;
			dig++;
		}		
		return dig;
	}

} Main public static void main(String[] args) throws IOException{
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String str;
		int a,b;
		while((str=in.readLine())!=null){
			a=getA(str);
			b=getB(str);
			System.out.println(countDigit(a+b));
		}
		
	} main {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String str;
		int a,b;
		while((str=in.readLine())!=null){
			a=getA(str);
			b=getB(str);
			System.out.println(countDigit(a+b));
		}
		
	} BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) String str; str int a a b; b while((str=in.readLine())!=null){
			a=getA(str);
			b=getB(str);
			System.out.println(countDigit(a+b));
		} (str=in.readLine())!=null (str=in.readLine()) str in.readLine() in.readLine in null {
			a=getA(str);
			b=getB(str);
			System.out.println(countDigit(a+b));
		} a=getA(str) a getA(str) getA str b=getB(str) b getB(str) getB str System.out.println(countDigit(a+b)) System.out.println System.out System System.out countDigit(a+b) countDigit a+b a b String[] args args public static int getA(String str){
		int index,num;
		index = str.indexOf(" ");
		num=Integer.parseInt(str.substring(0,index));
		return num;
	} getA {
		int index,num;
		index = str.indexOf(" ");
		num=Integer.parseInt(str.substring(0,index));
		return num;
	} int index index num; num index = str.indexOf(" ") index str.indexOf(" ") str.indexOf str " " num=Integer.parseInt(str.substring(0,index)) num Integer.parseInt(str.substring(0,index)) Integer.parseInt Integer str.substring(0,index) str.substring str 0 index return num; num String str str public static int getB(String str){
		int index,num;
		index = str.indexOf(" ");
		num=Integer.parseInt(str.substring(index+1));
		return num;
	} getB {
		int index,num;
		index = str.indexOf(" ");
		num=Integer.parseInt(str.substring(index+1));
		return num;
	} int index index num; num index = str.indexOf(" ") index str.indexOf(" ") str.indexOf str " " num=Integer.parseInt(str.substring(index+1)) num Integer.parseInt(str.substring(index+1)) Integer.parseInt Integer str.substring(index+1) str.substring str index+1 index 1 return num; num String str str public static int countDigit(int num){
		int dig=1;
		while(num>=10){
			num=num/10;
			dig++;
		}		
		return dig;
	} countDigit {
		int dig=1;
		while(num>=10){
			num=num/10;
			dig++;
		}		
		return dig;
	} int dig=1; dig 1 while(num>=10){
			num=num/10;
			dig++;
		} num>=10 num 10 {
			num=num/10;
			dig++;
		} num=num/10 num num/10 num 10 dig++ dig return dig; dig int num num public class Main {

	public static void main(String[] args) throws IOException{
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String str;
		int a,b;
		while((str=in.readLine())!=null){
			a=getA(str);
			b=getB(str);
			System.out.println(countDigit(a+b));
		}
		
	}
	
	public static int getA(String str){
		int index,num;
		index = str.indexOf(" ");
		num=Integer.parseInt(str.substring(0,index));
		return num;
	}
	
	public static int getB(String str){
		int index,num;
		index = str.indexOf(" ");
		num=Integer.parseInt(str.substring(index+1));
		return num;
	}
	
	public static int countDigit(int num){
		int dig=1;
		while(num>=10){
			num=num/10;
			dig++;
		}		
		return dig;
	}

} public class Main {

	public static void main(String[] args) throws IOException{
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String str;
		int a,b;
		while((str=in.readLine())!=null){
			a=getA(str);
			b=getB(str);
			System.out.println(countDigit(a+b));
		}
		
	}
	
	public static int getA(String str){
		int index,num;
		index = str.indexOf(" ");
		num=Integer.parseInt(str.substring(0,index));
		return num;
	}
	
	public static int getB(String str){
		int index,num;
		index = str.indexOf(" ");
		num=Integer.parseInt(str.substring(index+1));
		return num;
	}
	
	public static int countDigit(int num){
		int dig=1;
		while(num>=10){
			num=num/10;
			dig++;
		}		
		return dig;
	}

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws IOException{
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String str;
		int a,b;
		while((str=in.readLine())!=null){
			a=getA(str);
			b=getB(str);
			System.out.println(countDigit(a+b));
		}
		
	}
	
	public static int getA(String str){
		int index,num;
		index = str.indexOf(" ");
		num=Integer.parseInt(str.substring(0,index));
		return num;
	}
	
	public static int getB(String str){
		int index,num;
		index = str.indexOf(" ");
		num=Integer.parseInt(str.substring(index+1));
		return num;
	}
	
	public static int countDigit(int num){
		int dig=1;
		while(num>=10){
			num=num/10;
			dig++;
		}		
		return dig;
	}

}