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);
		String str;
		while((str=br.readLine())!=null){
			String[] num=str.split(" ");
			int sum=Integer.parseInt(num[0])+Integer.parseInt(num[1]);
			System.out.println(String.valueOf(sum).length());
		}
	}

} 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);
		String str;
		while((str=br.readLine())!=null){
			String[] num=str.split(" ");
			int sum=Integer.parseInt(num[0])+Integer.parseInt(num[1]);
			System.out.println(String.valueOf(sum).length());
		}
	}

} Main public static void main(String[] args)  throws IOException{
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);
		String str;
		while((str=br.readLine())!=null){
			String[] num=str.split(" ");
			int sum=Integer.parseInt(num[0])+Integer.parseInt(num[1]);
			System.out.println(String.valueOf(sum).length());
		}
	} main {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);
		String str;
		while((str=br.readLine())!=null){
			String[] num=str.split(" ");
			int sum=Integer.parseInt(num[0])+Integer.parseInt(num[1]);
			System.out.println(String.valueOf(sum).length());
		}
	} InputStreamReader is = new InputStreamReader(System.in); is new InputStreamReader(System.in) BufferedReader br = new BufferedReader(is); br new BufferedReader(is) String str; str while((str=br.readLine())!=null){
			String[] num=str.split(" ");
			int sum=Integer.parseInt(num[0])+Integer.parseInt(num[1]);
			System.out.println(String.valueOf(sum).length());
		} (str=br.readLine())!=null (str=br.readLine()) str br.readLine() br.readLine br null {
			String[] num=str.split(" ");
			int sum=Integer.parseInt(num[0])+Integer.parseInt(num[1]);
			System.out.println(String.valueOf(sum).length());
		} String[] num=str.split(" "); num str.split(" ") str.split str " " int sum=Integer.parseInt(num[0])+Integer.parseInt(num[1]); sum Integer.parseInt(num[0])+Integer.parseInt(num[1]) Integer.parseInt(num[0]) Integer.parseInt Integer num[0] num 0 Integer.parseInt(num[1]) Integer.parseInt Integer num[1] num 1 System.out.println(String.valueOf(sum).length()) System.out.println System.out System System.out String.valueOf(sum).length() String.valueOf(sum).length String.valueOf(sum) String.valueOf String sum 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);
		String str;
		while((str=br.readLine())!=null){
			String[] num=str.split(" ");
			int sum=Integer.parseInt(num[0])+Integer.parseInt(num[1]);
			System.out.println(String.valueOf(sum).length());
		}
	}

} public class Main{
	public static void main(String[] args)  throws IOException{
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);
		String str;
		while((str=br.readLine())!=null){
			String[] num=str.split(" ");
			int sum=Integer.parseInt(num[0])+Integer.parseInt(num[1]);
			System.out.println(String.valueOf(sum).length());
		}
	}

} 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);
		String str;
		while((str=br.readLine())!=null){
			String[] num=str.split(" ");
			int sum=Integer.parseInt(num[0])+Integer.parseInt(num[1]);
			System.out.println(String.valueOf(sum).length());
		}
	}

}