import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] a) throws IOException {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);
		String str;
		while ((str = br.readLine()) !=null) {

			String num_str[] = new String[2];
			num_str = str.split(" ");
			int sum = Integer.parseInt(num_str[0]) + Integer.parseInt(num_str[1]);
			System.out.println(Integer.toString(sum).length());
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
	public static void main(String[] a) throws IOException {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);
		String str;
		while ((str = br.readLine()) !=null) {

			String num_str[] = new String[2];
			num_str = str.split(" ");
			int sum = Integer.parseInt(num_str[0]) + Integer.parseInt(num_str[1]);
			System.out.println(Integer.toString(sum).length());
		}
	}
} Main public static void main(String[] a) throws IOException {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);
		String str;
		while ((str = br.readLine()) !=null) {

			String num_str[] = new String[2];
			num_str = str.split(" ");
			int sum = Integer.parseInt(num_str[0]) + Integer.parseInt(num_str[1]);
			System.out.println(Integer.toString(sum).length());
		}
	} main {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);
		String str;
		while ((str = br.readLine()) !=null) {

			String num_str[] = new String[2];
			num_str = str.split(" ");
			int sum = Integer.parseInt(num_str[0]) + Integer.parseInt(num_str[1]);
			System.out.println(Integer.toString(sum).length());
		}
	} InputStreamReader is = new InputStreamReader(System.in); is new InputStreamReader(System.in) BufferedReader br = new BufferedReader(is); br new BufferedReader(is) String str; str while ((str = br.readLine()) !=null) {

			String num_str[] = new String[2];
			num_str = str.split(" ");
			int sum = Integer.parseInt(num_str[0]) + Integer.parseInt(num_str[1]);
			System.out.println(Integer.toString(sum).length());
		} (str = br.readLine()) !=null (str = br.readLine()) str br.readLine() br.readLine br null {

			String num_str[] = new String[2];
			num_str = str.split(" ");
			int sum = Integer.parseInt(num_str[0]) + Integer.parseInt(num_str[1]);
			System.out.println(Integer.toString(sum).length());
		} String num_str[] = new String[2]; num_str new String[2] 2 num_str = str.split(" ") num_str str.split(" ") str.split str " " int sum = Integer.parseInt(num_str[0]) + Integer.parseInt(num_str[1]); sum Integer.parseInt(num_str[0]) + Integer.parseInt(num_str[1]) Integer.parseInt(num_str[0]) Integer.parseInt Integer num_str[0] num_str 0 Integer.parseInt(num_str[1]) Integer.parseInt Integer num_str[1] num_str 1 System.out.println(Integer.toString(sum).length()) System.out.println System.out System System.out Integer.toString(sum).length() Integer.toString(sum).length Integer.toString(sum) Integer.toString Integer sum String[] a a public class Main {
	public static void main(String[] a) throws IOException {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);
		String str;
		while ((str = br.readLine()) !=null) {

			String num_str[] = new String[2];
			num_str = str.split(" ");
			int sum = Integer.parseInt(num_str[0]) + Integer.parseInt(num_str[1]);
			System.out.println(Integer.toString(sum).length());
		}
	}
} public class Main {
	public static void main(String[] a) throws IOException {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);
		String str;
		while ((str = br.readLine()) !=null) {

			String num_str[] = new String[2];
			num_str = str.split(" ");
			int sum = Integer.parseInt(num_str[0]) + Integer.parseInt(num_str[1]);
			System.out.println(Integer.toString(sum).length());
		}
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] a) throws IOException {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);
		String str;
		while ((str = br.readLine()) !=null) {

			String num_str[] = new String[2];
			num_str = str.split(" ");
			int sum = Integer.parseInt(num_str[0]) + Integer.parseInt(num_str[1]);
			System.out.println(Integer.toString(sum).length());
		}
	}
}