
import java.util.Scanner;

public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			int a = sc.nextInt();
			int b = sc.nextInt();

			int n = a + b;
			int cnt = 1;
			while (n != 0) {
				n = n / 10;
				cnt++;
			}
			System.out.println(cnt - 1);

	}
	}

} import java.util.Scanner; Scanner java.util public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			int a = sc.nextInt();
			int b = sc.nextInt();

			int n = a + b;
			int cnt = 1;
			while (n != 0) {
				n = n / 10;
				cnt++;
			}
			System.out.println(cnt - 1);

	}
	}

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

			int n = a + b;
			int cnt = 1;
			while (n != 0) {
				n = n / 10;
				cnt++;
			}
			System.out.println(cnt - 1);

	}
	} main {
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			int a = sc.nextInt();
			int b = sc.nextInt();

			int n = a + b;
			int cnt = 1;
			while (n != 0) {
				n = n / 10;
				cnt++;
			}
			System.out.println(cnt - 1);

	}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while(sc.hasNext()){
			int a = sc.nextInt();
			int b = sc.nextInt();

			int n = a + b;
			int cnt = 1;
			while (n != 0) {
				n = n / 10;
				cnt++;
			}
			System.out.println(cnt - 1);

	} sc.hasNext() sc.hasNext sc {
			int a = sc.nextInt();
			int b = sc.nextInt();

			int n = a + b;
			int cnt = 1;
			while (n != 0) {
				n = n / 10;
				cnt++;
			}
			System.out.println(cnt - 1);

	} int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int n = a + b; n a + b a b int cnt = 1; cnt 1 while (n != 0) {
				n = n / 10;
				cnt++;
			} n != 0 n 0 {
				n = n / 10;
				cnt++;
			} n = n / 10 n n / 10 n 10 cnt++ cnt System.out.println(cnt - 1) System.out.println System.out System System.out cnt - 1 cnt 1 String[] args args public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			int a = sc.nextInt();
			int b = sc.nextInt();

			int n = a + b;
			int cnt = 1;
			while (n != 0) {
				n = n / 10;
				cnt++;
			}
			System.out.println(cnt - 1);

	}
	}

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

			int n = a + b;
			int cnt = 1;
			while (n != 0) {
				n = n / 10;
				cnt++;
			}
			System.out.println(cnt - 1);

	}
	}

} Main

import java.util.Scanner;

public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			int a = sc.nextInt();
			int b = sc.nextInt();

			int n = a + b;
			int cnt = 1;
			while (n != 0) {
				n = n / 10;
				cnt++;
			}
			System.out.println(cnt - 1);

	}
	}

}