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


public class Main {

	/**
	 * @param args
	 * @throws IOException
	 */
	public static void main(String[] args) throws IOException {
		// TODO ツ篠ゥツ督ョツ青カツ青ャツつウツづェツつスツδソツッツドツ・ツスツタツブ
		BufferedReader d= new BufferedReader(new InputStreamReader(System.in));
		String temp;
		while((temp	=d.readLine())!= null){
			String array[]=temp.split(" ");

			int a=Integer.valueOf(array[0]).intValue(),b=Integer.valueOf(array[1]).intValue();
			String sum =String.valueOf(a+b);
			System.out.println(sum.length());
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	/**
	 * @param args
	 * @throws IOException
	 */
	public static void main(String[] args) throws IOException {
		// TODO ツ篠ゥツ督ョツ青カツ青ャツつウツづェツつスツδソツッツドツ・ツスツタツブ
		BufferedReader d= new BufferedReader(new InputStreamReader(System.in));
		String temp;
		while((temp	=d.readLine())!= null){
			String array[]=temp.split(" ");

			int a=Integer.valueOf(array[0]).intValue(),b=Integer.valueOf(array[1]).intValue();
			String sum =String.valueOf(a+b);
			System.out.println(sum.length());
		}
	}
} Main /**
	 * @param args
	 * @throws IOException
	 */
	public static void main(String[] args) throws IOException {
		// TODO ツ篠ゥツ督ョツ青カツ青ャツつウツづェツつスツδソツッツドツ・ツスツタツブ
		BufferedReader d= new BufferedReader(new InputStreamReader(System.in));
		String temp;
		while((temp	=d.readLine())!= null){
			String array[]=temp.split(" ");

			int a=Integer.valueOf(array[0]).intValue(),b=Integer.valueOf(array[1]).intValue();
			String sum =String.valueOf(a+b);
			System.out.println(sum.length());
		}
	} main {
		// TODO ツ篠ゥツ督ョツ青カツ青ャツつウツづェツつスツδソツッツドツ・ツスツタツブ
		BufferedReader d= new BufferedReader(new InputStreamReader(System.in));
		String temp;
		while((temp	=d.readLine())!= null){
			String array[]=temp.split(" ");

			int a=Integer.valueOf(array[0]).intValue(),b=Integer.valueOf(array[1]).intValue();
			String sum =String.valueOf(a+b);
			System.out.println(sum.length());
		}
	} BufferedReader d= new BufferedReader(new InputStreamReader(System.in)); d new BufferedReader(new InputStreamReader(System.in)) String temp; temp while((temp	=d.readLine())!= null){
			String array[]=temp.split(" ");

			int a=Integer.valueOf(array[0]).intValue(),b=Integer.valueOf(array[1]).intValue();
			String sum =String.valueOf(a+b);
			System.out.println(sum.length());
		} (temp	=d.readLine())!= null (temp	=d.readLine()) temp d.readLine() d.readLine d null {
			String array[]=temp.split(" ");

			int a=Integer.valueOf(array[0]).intValue(),b=Integer.valueOf(array[1]).intValue();
			String sum =String.valueOf(a+b);
			System.out.println(sum.length());
		} String array[]=temp.split(" "); array temp.split(" ") temp.split temp " " int a=Integer.valueOf(array[0]).intValue() a Integer.valueOf(array[0]).intValue() Integer.valueOf(array[0]).intValue Integer.valueOf(array[0]) Integer.valueOf Integer array[0] array 0 b=Integer.valueOf(array[1]).intValue(); b Integer.valueOf(array[1]).intValue() Integer.valueOf(array[1]).intValue Integer.valueOf(array[1]) Integer.valueOf Integer array[1] array 1 String sum =String.valueOf(a+b); sum String.valueOf(a+b) String.valueOf String a+b a b System.out.println(sum.length()) System.out.println System.out System System.out sum.length() sum.length sum String[] args args public class Main {

	/**
	 * @param args
	 * @throws IOException
	 */
	public static void main(String[] args) throws IOException {
		// TODO ツ篠ゥツ督ョツ青カツ青ャツつウツづェツつスツδソツッツドツ・ツスツタツブ
		BufferedReader d= new BufferedReader(new InputStreamReader(System.in));
		String temp;
		while((temp	=d.readLine())!= null){
			String array[]=temp.split(" ");

			int a=Integer.valueOf(array[0]).intValue(),b=Integer.valueOf(array[1]).intValue();
			String sum =String.valueOf(a+b);
			System.out.println(sum.length());
		}
	}
} public class Main {

	/**
	 * @param args
	 * @throws IOException
	 */
	public static void main(String[] args) throws IOException {
		// TODO ツ篠ゥツ督ョツ青カツ青ャツつウツづェツつスツδソツッツドツ・ツスツタツブ
		BufferedReader d= new BufferedReader(new InputStreamReader(System.in));
		String temp;
		while((temp	=d.readLine())!= null){
			String array[]=temp.split(" ");

			int a=Integer.valueOf(array[0]).intValue(),b=Integer.valueOf(array[1]).intValue();
			String sum =String.valueOf(a+b);
			System.out.println(sum.length());
		}
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;


public class Main {

	/**
	 * @param args
	 * @throws IOException
	 */
	public static void main(String[] args) throws IOException {
		// TODO ツ篠ゥツ督ョツ青カツ青ャツつウツづェツつスツδソツッツドツ・ツスツタツブ
		BufferedReader d= new BufferedReader(new InputStreamReader(System.in));
		String temp;
		while((temp	=d.readLine())!= null){
			String array[]=temp.split(" ");

			int a=Integer.valueOf(array[0]).intValue(),b=Integer.valueOf(array[1]).intValue();
			String sum =String.valueOf(a+b);
			System.out.println(sum.length());
		}
	}
}