import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		while (sc.hasNextLine()) {
			String string = sc.nextLine();
			if (string.equals("")) {
				break;

			}
			String[] a = string.split(" ");
			int p = Integer.parseInt(a[0]);
			int q = Integer.parseInt(a[1]);

			int sum = p + q;

			System.out.println(String.valueOf(sum).length());
		}

	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		while (sc.hasNextLine()) {
			String string = sc.nextLine();
			if (string.equals("")) {
				break;

			}
			String[] a = string.split(" ");
			int p = Integer.parseInt(a[0]);
			int q = Integer.parseInt(a[1]);

			int sum = p + q;

			System.out.println(String.valueOf(sum).length());
		}

	}

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

		while (sc.hasNextLine()) {
			String string = sc.nextLine();
			if (string.equals("")) {
				break;

			}
			String[] a = string.split(" ");
			int p = Integer.parseInt(a[0]);
			int q = Integer.parseInt(a[1]);

			int sum = p + q;

			System.out.println(String.valueOf(sum).length());
		}

	} main {
		Scanner sc = new Scanner(System.in);

		while (sc.hasNextLine()) {
			String string = sc.nextLine();
			if (string.equals("")) {
				break;

			}
			String[] a = string.split(" ");
			int p = Integer.parseInt(a[0]);
			int q = Integer.parseInt(a[1]);

			int sum = p + q;

			System.out.println(String.valueOf(sum).length());
		}

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while (sc.hasNextLine()) {
			String string = sc.nextLine();
			if (string.equals("")) {
				break;

			}
			String[] a = string.split(" ");
			int p = Integer.parseInt(a[0]);
			int q = Integer.parseInt(a[1]);

			int sum = p + q;

			System.out.println(String.valueOf(sum).length());
		} sc.hasNextLine() sc.hasNextLine sc {
			String string = sc.nextLine();
			if (string.equals("")) {
				break;

			}
			String[] a = string.split(" ");
			int p = Integer.parseInt(a[0]);
			int q = Integer.parseInt(a[1]);

			int sum = p + q;

			System.out.println(String.valueOf(sum).length());
		} String string = sc.nextLine(); string sc.nextLine() sc.nextLine sc if (string.equals("")) {
				break;

			} string.equals("") string.equals string "" {
				break;

			} break; String[] a = string.split(" "); a string.split(" ") string.split string " " int p = Integer.parseInt(a[0]); p Integer.parseInt(a[0]) Integer.parseInt Integer a[0] a 0 int q = Integer.parseInt(a[1]); q Integer.parseInt(a[1]) Integer.parseInt Integer a[1] a 1 int sum = p + q; sum p + q p q System.out.println(String.valueOf(sum).length()) System.out.println System.out System System.out String.valueOf(sum).length() String.valueOf(sum).length String.valueOf(sum) String.valueOf String sum String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		while (sc.hasNextLine()) {
			String string = sc.nextLine();
			if (string.equals("")) {
				break;

			}
			String[] a = string.split(" ");
			int p = Integer.parseInt(a[0]);
			int q = Integer.parseInt(a[1]);

			int sum = p + q;

			System.out.println(String.valueOf(sum).length());
		}

	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		while (sc.hasNextLine()) {
			String string = sc.nextLine();
			if (string.equals("")) {
				break;

			}
			String[] a = string.split(" ");
			int p = Integer.parseInt(a[0]);
			int q = Integer.parseInt(a[1]);

			int sum = p + q;

			System.out.println(String.valueOf(sum).length());
		}

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		while (sc.hasNextLine()) {
			String string = sc.nextLine();
			if (string.equals("")) {
				break;

			}
			String[] a = string.split(" ");
			int p = Integer.parseInt(a[0]);
			int q = Integer.parseInt(a[1]);

			int sum = p + q;

			System.out.println(String.valueOf(sum).length());
		}

	}

}