import java.io.*;
public class Main {

	public static void main(String[] args)throws IOException {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br =new  BufferedReader(is);
		while(true){
			String str = br.readLine();
			if(str == null)
				break;
			String str1 = str.substring(0, str.indexOf(" "));
			String str2 = str.substring(str.indexOf(" ")+1);
			int n1 = Integer.parseInt(str1);
			int n2 = Integer.parseInt(str2);
			int count1=0;
			n1 = n1 + n2;
			while(n1 > 0){
				n1 = n1/10;
				count1++;
			}
			System.out.println(count1);
		}
	}

} import java.io.*; io.* java public class Main {

	public static void main(String[] args)throws IOException {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br =new  BufferedReader(is);
		while(true){
			String str = br.readLine();
			if(str == null)
				break;
			String str1 = str.substring(0, str.indexOf(" "));
			String str2 = str.substring(str.indexOf(" ")+1);
			int n1 = Integer.parseInt(str1);
			int n2 = Integer.parseInt(str2);
			int count1=0;
			n1 = n1 + n2;
			while(n1 > 0){
				n1 = n1/10;
				count1++;
			}
			System.out.println(count1);
		}
	}

} Main public static void main(String[] args)throws IOException {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br =new  BufferedReader(is);
		while(true){
			String str = br.readLine();
			if(str == null)
				break;
			String str1 = str.substring(0, str.indexOf(" "));
			String str2 = str.substring(str.indexOf(" ")+1);
			int n1 = Integer.parseInt(str1);
			int n2 = Integer.parseInt(str2);
			int count1=0;
			n1 = n1 + n2;
			while(n1 > 0){
				n1 = n1/10;
				count1++;
			}
			System.out.println(count1);
		}
	} main {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br =new  BufferedReader(is);
		while(true){
			String str = br.readLine();
			if(str == null)
				break;
			String str1 = str.substring(0, str.indexOf(" "));
			String str2 = str.substring(str.indexOf(" ")+1);
			int n1 = Integer.parseInt(str1);
			int n2 = Integer.parseInt(str2);
			int count1=0;
			n1 = n1 + n2;
			while(n1 > 0){
				n1 = n1/10;
				count1++;
			}
			System.out.println(count1);
		}
	} InputStreamReader is = new InputStreamReader(System.in); is new InputStreamReader(System.in) BufferedReader br =new  BufferedReader(is); br new  BufferedReader(is) while(true){
			String str = br.readLine();
			if(str == null)
				break;
			String str1 = str.substring(0, str.indexOf(" "));
			String str2 = str.substring(str.indexOf(" ")+1);
			int n1 = Integer.parseInt(str1);
			int n2 = Integer.parseInt(str2);
			int count1=0;
			n1 = n1 + n2;
			while(n1 > 0){
				n1 = n1/10;
				count1++;
			}
			System.out.println(count1);
		} true {
			String str = br.readLine();
			if(str == null)
				break;
			String str1 = str.substring(0, str.indexOf(" "));
			String str2 = str.substring(str.indexOf(" ")+1);
			int n1 = Integer.parseInt(str1);
			int n2 = Integer.parseInt(str2);
			int count1=0;
			n1 = n1 + n2;
			while(n1 > 0){
				n1 = n1/10;
				count1++;
			}
			System.out.println(count1);
		} String str = br.readLine(); str br.readLine() br.readLine br if(str == null)
				break; str == null str null break; String str1 = str.substring(0, str.indexOf(" ")); str1 str.substring(0, str.indexOf(" ")) str.substring str 0 str.indexOf(" ") str.indexOf str " " String str2 = str.substring(str.indexOf(" ")+1); str2 str.substring(str.indexOf(" ")+1) str.substring str str.indexOf(" ")+1 str.indexOf(" ") str.indexOf str " " 1 int n1 = Integer.parseInt(str1); n1 Integer.parseInt(str1) Integer.parseInt Integer str1 int n2 = Integer.parseInt(str2); n2 Integer.parseInt(str2) Integer.parseInt Integer str2 int count1=0; count1 0 n1 = n1 + n2 n1 n1 + n2 n1 n2 while(n1 > 0){
				n1 = n1/10;
				count1++;
			} n1 > 0 n1 0 {
				n1 = n1/10;
				count1++;
			} n1 = n1/10 n1 n1/10 n1 10 count1++ count1 System.out.println(count1) System.out.println System.out System System.out count1 String[] args args public class Main {

	public static void main(String[] args)throws IOException {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br =new  BufferedReader(is);
		while(true){
			String str = br.readLine();
			if(str == null)
				break;
			String str1 = str.substring(0, str.indexOf(" "));
			String str2 = str.substring(str.indexOf(" ")+1);
			int n1 = Integer.parseInt(str1);
			int n2 = Integer.parseInt(str2);
			int count1=0;
			n1 = n1 + n2;
			while(n1 > 0){
				n1 = n1/10;
				count1++;
			}
			System.out.println(count1);
		}
	}

} public class Main {

	public static void main(String[] args)throws IOException {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br =new  BufferedReader(is);
		while(true){
			String str = br.readLine();
			if(str == null)
				break;
			String str1 = str.substring(0, str.indexOf(" "));
			String str2 = str.substring(str.indexOf(" ")+1);
			int n1 = Integer.parseInt(str1);
			int n2 = Integer.parseInt(str2);
			int count1=0;
			n1 = n1 + n2;
			while(n1 > 0){
				n1 = n1/10;
				count1++;
			}
			System.out.println(count1);
		}
	}

} Main
import java.io.*;
public class Main {

	public static void main(String[] args)throws IOException {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br =new  BufferedReader(is);
		while(true){
			String str = br.readLine();
			if(str == null)
				break;
			String str1 = str.substring(0, str.indexOf(" "));
			String str2 = str.substring(str.indexOf(" ")+1);
			int n1 = Integer.parseInt(str1);
			int n2 = Integer.parseInt(str2);
			int count1=0;
			n1 = n1 + n2;
			while(n1 > 0){
				n1 = n1/10;
				count1++;
			}
			System.out.println(count1);
		}
	}

}