import java.util.ArrayList;
import java.util.Scanner;

//public class Main {
//
//	public static void main(String[] args) {
//		// TODO ?????????????????????????????????????????????
//		Scanner s = new Scanner(System.in);
//		int a,b;
//		ArrayList<String> str = new ArrayList<String>();
//		String[] result;
//		
//		for(int i = 0;i <3;i++)
//		{
//			str.add(s.nextLine());
//
//		}
//		
//		for(int i = 0;i<3;i++)
//		{
//			result = str.get(i).split(" ");
//			a = Integer.parseInt(result[0]);
//			b = Integer.parseInt(result[1]);
//			System.out.println(String.valueOf(a+b).length());
//		}
//	}
//}
public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner s = new Scanner(System.in);
		int a,b;
		ArrayList<String> str = new ArrayList<String>();
		String[] result;
		
		while(s.hasNext())
		{

			
			a = s.nextInt();
			b = s.nextInt();
			System.out.println(String.valueOf(a+b).length());
		
		}
	}
} import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner s = new Scanner(System.in);
		int a,b;
		ArrayList<String> str = new ArrayList<String>();
		String[] result;
		
		while(s.hasNext())
		{

			
			a = s.nextInt();
			b = s.nextInt();
			System.out.println(String.valueOf(a+b).length());
		
		}
	}
} Main public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner s = new Scanner(System.in);
		int a,b;
		ArrayList<String> str = new ArrayList<String>();
		String[] result;
		
		while(s.hasNext())
		{

			
			a = s.nextInt();
			b = s.nextInt();
			System.out.println(String.valueOf(a+b).length());
		
		}
	} main {
		// TODO ?????????????????????????????????????????????
		Scanner s = new Scanner(System.in);
		int a,b;
		ArrayList<String> str = new ArrayList<String>();
		String[] result;
		
		while(s.hasNext())
		{

			
			a = s.nextInt();
			b = s.nextInt();
			System.out.println(String.valueOf(a+b).length());
		
		}
	} Scanner s = new Scanner(System.in); s new Scanner(System.in) int a a b; b ArrayList<String> str = new ArrayList<String>(); str new ArrayList<String>() String[] result; result while(s.hasNext())
		{

			
			a = s.nextInt();
			b = s.nextInt();
			System.out.println(String.valueOf(a+b).length());
		
		} s.hasNext() s.hasNext s {

			
			a = s.nextInt();
			b = s.nextInt();
			System.out.println(String.valueOf(a+b).length());
		
		} a = s.nextInt() a s.nextInt() s.nextInt s b = s.nextInt() b s.nextInt() s.nextInt s System.out.println(String.valueOf(a+b).length()) System.out.println System.out System System.out String.valueOf(a+b).length() String.valueOf(a+b).length String.valueOf(a+b) String.valueOf String a+b a b String[] args args public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner s = new Scanner(System.in);
		int a,b;
		ArrayList<String> str = new ArrayList<String>();
		String[] result;
		
		while(s.hasNext())
		{

			
			a = s.nextInt();
			b = s.nextInt();
			System.out.println(String.valueOf(a+b).length());
		
		}
	}
} public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner s = new Scanner(System.in);
		int a,b;
		ArrayList<String> str = new ArrayList<String>();
		String[] result;
		
		while(s.hasNext())
		{

			
			a = s.nextInt();
			b = s.nextInt();
			System.out.println(String.valueOf(a+b).length());
		
		}
	}
} Main
import java.util.ArrayList;
import java.util.Scanner;

//public class Main {
//
//	public static void main(String[] args) {
//		// TODO ?????????????????????????????????????????????
//		Scanner s = new Scanner(System.in);
//		int a,b;
//		ArrayList<String> str = new ArrayList<String>();
//		String[] result;
//		
//		for(int i = 0;i <3;i++)
//		{
//			str.add(s.nextLine());
//
//		}
//		
//		for(int i = 0;i<3;i++)
//		{
//			result = str.get(i).split(" ");
//			a = Integer.parseInt(result[0]);
//			b = Integer.parseInt(result[1]);
//			System.out.println(String.valueOf(a+b).length());
//		}
//	}
//}
public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner s = new Scanner(System.in);
		int a,b;
		ArrayList<String> str = new ArrayList<String>();
		String[] result;
		
		while(s.hasNext())
		{

			
			a = s.nextInt();
			b = s.nextInt();
			System.out.println(String.valueOf(a+b).length());
		
		}
	}
}