public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		java.util.Scanner sc = new java.util.Scanner(System.in);

		while ( sc.hasNext() ) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			int sum = a + b;

			int count = 0;
			while (sum != 0) {
				sum = sum / 10;
				count++;
			}
			System.out.println(count);
		}
	}

} public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		java.util.Scanner sc = new java.util.Scanner(System.in);

		while ( sc.hasNext() ) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			int sum = a + b;

			int count = 0;
			while (sum != 0) {
				sum = sum / 10;
				count++;
			}
			System.out.println(count);
		}
	}

} Main public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		java.util.Scanner sc = new java.util.Scanner(System.in);

		while ( sc.hasNext() ) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			int sum = a + b;

			int count = 0;
			while (sum != 0) {
				sum = sum / 10;
				count++;
			}
			System.out.println(count);
		}
	} main {
		// TODO ?????????????????????????????????????????????
		java.util.Scanner sc = new java.util.Scanner(System.in);

		while ( sc.hasNext() ) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			int sum = a + b;

			int count = 0;
			while (sum != 0) {
				sum = sum / 10;
				count++;
			}
			System.out.println(count);
		}
	} java.util.Scanner sc = new java.util.Scanner(System.in); sc new java.util.Scanner(System.in) while ( sc.hasNext() ) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			int sum = a + b;

			int count = 0;
			while (sum != 0) {
				sum = sum / 10;
				count++;
			}
			System.out.println(count);
		} sc.hasNext() sc.hasNext sc {
			int a = sc.nextInt();
			int b = sc.nextInt();
			int sum = a + b;

			int count = 0;
			while (sum != 0) {
				sum = sum / 10;
				count++;
			}
			System.out.println(count);
		} int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int sum = a + b; sum a + b a b int count = 0; count 0 while (sum != 0) {
				sum = sum / 10;
				count++;
			} sum != 0 sum 0 {
				sum = sum / 10;
				count++;
			} sum = sum / 10 sum sum / 10 sum 10 count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		java.util.Scanner sc = new java.util.Scanner(System.in);

		while ( sc.hasNext() ) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			int sum = a + b;

			int count = 0;
			while (sum != 0) {
				sum = sum / 10;
				count++;
			}
			System.out.println(count);
		}
	}

} public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		java.util.Scanner sc = new java.util.Scanner(System.in);

		while ( sc.hasNext() ) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			int sum = a + b;

			int count = 0;
			while (sum != 0) {
				sum = sum / 10;
				count++;
			}
			System.out.println(count);
		}
	}

} Main
public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		java.util.Scanner sc = new java.util.Scanner(System.in);

		while ( sc.hasNext() ) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			int sum = a + b;

			int count = 0;
			while (sum != 0) {
				sum = sum / 10;
				count++;
			}
			System.out.println(count);
		}
	}

}