import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while (sc.hasNextLine()) {
			String[] array = (sc.nextLine().split(" "));
			int result = Integer.parseInt(array[0]) + Integer.parseInt(array[1]);
			System.out.println(String.valueOf(result).length());
		}
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while (sc.hasNextLine()) {
			String[] array = (sc.nextLine().split(" "));
			int result = Integer.parseInt(array[0]) + Integer.parseInt(array[1]);
			System.out.println(String.valueOf(result).length());
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while (sc.hasNextLine()) {
			String[] array = (sc.nextLine().split(" "));
			int result = Integer.parseInt(array[0]) + Integer.parseInt(array[1]);
			System.out.println(String.valueOf(result).length());
		}
	} main {
		Scanner sc = new Scanner(System.in);
		while (sc.hasNextLine()) {
			String[] array = (sc.nextLine().split(" "));
			int result = Integer.parseInt(array[0]) + Integer.parseInt(array[1]);
			System.out.println(String.valueOf(result).length());
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while (sc.hasNextLine()) {
			String[] array = (sc.nextLine().split(" "));
			int result = Integer.parseInt(array[0]) + Integer.parseInt(array[1]);
			System.out.println(String.valueOf(result).length());
		} sc.hasNextLine() sc.hasNextLine sc {
			String[] array = (sc.nextLine().split(" "));
			int result = Integer.parseInt(array[0]) + Integer.parseInt(array[1]);
			System.out.println(String.valueOf(result).length());
		} String[] array = (sc.nextLine().split(" ")); array (sc.nextLine().split(" ")) sc.nextLine().split sc.nextLine() sc.nextLine sc " " int result = Integer.parseInt(array[0]) + Integer.parseInt(array[1]); result Integer.parseInt(array[0]) + Integer.parseInt(array[1]) Integer.parseInt(array[0]) Integer.parseInt Integer array[0] array 0 Integer.parseInt(array[1]) Integer.parseInt Integer array[1] array 1 System.out.println(String.valueOf(result).length()) System.out.println System.out System System.out String.valueOf(result).length() String.valueOf(result).length String.valueOf(result) String.valueOf String result String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while (sc.hasNextLine()) {
			String[] array = (sc.nextLine().split(" "));
			int result = Integer.parseInt(array[0]) + Integer.parseInt(array[1]);
			System.out.println(String.valueOf(result).length());
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while (sc.hasNextLine()) {
			String[] array = (sc.nextLine().split(" "));
			int result = Integer.parseInt(array[0]) + Integer.parseInt(array[1]);
			System.out.println(String.valueOf(result).length());
		}
	}
} Main
import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while (sc.hasNextLine()) {
			String[] array = (sc.nextLine().split(" "));
			int result = Integer.parseInt(array[0]) + Integer.parseInt(array[1]);
			System.out.println(String.valueOf(result).length());
		}
	}
}