import java.util.Scanner;

public class Main {

	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		while (sc.hasNext()) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			
			System.out.println( digit(a, b) );
		}

	}
	private static int digit(int a, int b) {
		int dg = Integer.toString(a + b).length();
		return dg;
	}
} import java.util.Scanner; Scanner java.util public class Main {

	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		while (sc.hasNext()) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			
			System.out.println( digit(a, b) );
		}

	}
	private static int digit(int a, int b) {
		int dg = Integer.toString(a + b).length();
		return dg;
	}
} Main static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) {
		while (sc.hasNext()) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			
			System.out.println( digit(a, b) );
		}

	} main {
		while (sc.hasNext()) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			
			System.out.println( digit(a, b) );
		}

	} while (sc.hasNext()) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			
			System.out.println( digit(a, b) );
		} sc.hasNext() sc.hasNext sc {
			int a = sc.nextInt();
			int b = sc.nextInt();
			
			System.out.println( digit(a, b) );
		} int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc System.out.println( digit(a, b) ) System.out.println System.out System System.out digit(a, b) digit a b String[] args args private static int digit(int a, int b) {
		int dg = Integer.toString(a + b).length();
		return dg;
	} digit {
		int dg = Integer.toString(a + b).length();
		return dg;
	} int dg = Integer.toString(a + b).length(); dg Integer.toString(a + b).length() Integer.toString(a + b).length Integer.toString(a + b) Integer.toString Integer a + b a b return dg; dg int a a int b b public class Main {

	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		while (sc.hasNext()) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			
			System.out.println( digit(a, b) );
		}

	}
	private static int digit(int a, int b) {
		int dg = Integer.toString(a + b).length();
		return dg;
	}
} public class Main {

	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		while (sc.hasNext()) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			
			System.out.println( digit(a, b) );
		}

	}
	private static int digit(int a, int b) {
		int dg = Integer.toString(a + b).length();
		return dg;
	}
} Main
import java.util.Scanner;

public class Main {

	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		while (sc.hasNext()) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			
			System.out.println( digit(a, b) );
		}

	}
	private static int digit(int a, int b) {
		int dg = Integer.toString(a + b).length();
		return dg;
	}
}
