import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

class Main {

	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			List<Integer> list = new ArrayList<Integer>();
			String s;

			while ((s = br.readLine()) != null && list.size() <= 200) {

				String[] num = s.split(" ");
				if (0 <= Integer.parseInt(num[0])
						&& Integer.parseInt(num[1]) <= 1000000) {
					int sum = Integer.parseInt(num[0])
							+ Integer.parseInt(num[1]);
					list.add(Integer.toString(sum).length());
				}else {
					break;
				}
			}

			for (int keta : list) {
				System.out.println(keta);
			}

		} finally {
			br.close();
		}

	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util class Main {

	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			List<Integer> list = new ArrayList<Integer>();
			String s;

			while ((s = br.readLine()) != null && list.size() <= 200) {

				String[] num = s.split(" ");
				if (0 <= Integer.parseInt(num[0])
						&& Integer.parseInt(num[1]) <= 1000000) {
					int sum = Integer.parseInt(num[0])
							+ Integer.parseInt(num[1]);
					list.add(Integer.toString(sum).length());
				}else {
					break;
				}
			}

			for (int keta : list) {
				System.out.println(keta);
			}

		} finally {
			br.close();
		}

	}
} Main public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			List<Integer> list = new ArrayList<Integer>();
			String s;

			while ((s = br.readLine()) != null && list.size() <= 200) {

				String[] num = s.split(" ");
				if (0 <= Integer.parseInt(num[0])
						&& Integer.parseInt(num[1]) <= 1000000) {
					int sum = Integer.parseInt(num[0])
							+ Integer.parseInt(num[1]);
					list.add(Integer.toString(sum).length());
				}else {
					break;
				}
			}

			for (int keta : list) {
				System.out.println(keta);
			}

		} finally {
			br.close();
		}

	} main {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			List<Integer> list = new ArrayList<Integer>();
			String s;

			while ((s = br.readLine()) != null && list.size() <= 200) {

				String[] num = s.split(" ");
				if (0 <= Integer.parseInt(num[0])
						&& Integer.parseInt(num[1]) <= 1000000) {
					int sum = Integer.parseInt(num[0])
							+ Integer.parseInt(num[1]);
					list.add(Integer.toString(sum).length());
				}else {
					break;
				}
			}

			for (int keta : list) {
				System.out.println(keta);
			}

		} finally {
			br.close();
		}

	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) try {
			List<Integer> list = new ArrayList<Integer>();
			String s;

			while ((s = br.readLine()) != null && list.size() <= 200) {

				String[] num = s.split(" ");
				if (0 <= Integer.parseInt(num[0])
						&& Integer.parseInt(num[1]) <= 1000000) {
					int sum = Integer.parseInt(num[0])
							+ Integer.parseInt(num[1]);
					list.add(Integer.toString(sum).length());
				}else {
					break;
				}
			}

			for (int keta : list) {
				System.out.println(keta);
			}

		} finally {
			br.close();
		} {
			br.close();
		} br.close() br.close br {
			List<Integer> list = new ArrayList<Integer>();
			String s;

			while ((s = br.readLine()) != null && list.size() <= 200) {

				String[] num = s.split(" ");
				if (0 <= Integer.parseInt(num[0])
						&& Integer.parseInt(num[1]) <= 1000000) {
					int sum = Integer.parseInt(num[0])
							+ Integer.parseInt(num[1]);
					list.add(Integer.toString(sum).length());
				}else {
					break;
				}
			}

			for (int keta : list) {
				System.out.println(keta);
			}

		} List<Integer> list = new ArrayList<Integer>(); list new ArrayList<Integer>() String s; s while ((s = br.readLine()) != null && list.size() <= 200) {

				String[] num = s.split(" ");
				if (0 <= Integer.parseInt(num[0])
						&& Integer.parseInt(num[1]) <= 1000000) {
					int sum = Integer.parseInt(num[0])
							+ Integer.parseInt(num[1]);
					list.add(Integer.toString(sum).length());
				}else {
					break;
				}
			} (s = br.readLine()) != null && list.size() <= 200 (s = br.readLine()) != null (s = br.readLine()) s br.readLine() br.readLine br null list.size() <= 200 list.size() list.size list 200 {

				String[] num = s.split(" ");
				if (0 <= Integer.parseInt(num[0])
						&& Integer.parseInt(num[1]) <= 1000000) {
					int sum = Integer.parseInt(num[0])
							+ Integer.parseInt(num[1]);
					list.add(Integer.toString(sum).length());
				}else {
					break;
				}
			} String[] num = s.split(" "); num s.split(" ") s.split s " " if (0 <= Integer.parseInt(num[0])
						&& Integer.parseInt(num[1]) <= 1000000) {
					int sum = Integer.parseInt(num[0])
							+ Integer.parseInt(num[1]);
					list.add(Integer.toString(sum).length());
				}else {
					break;
				} 0 <= Integer.parseInt(num[0])
						&& Integer.parseInt(num[1]) <= 1000000 0 <= Integer.parseInt(num[0]) 0 Integer.parseInt(num[0]) Integer.parseInt Integer num[0] num 0 Integer.parseInt(num[1]) <= 1000000 Integer.parseInt(num[1]) Integer.parseInt Integer num[1] num 1 1000000 {
					int sum = Integer.parseInt(num[0])
							+ Integer.parseInt(num[1]);
					list.add(Integer.toString(sum).length());
				} int sum = Integer.parseInt(num[0])
							+ Integer.parseInt(num[1]); sum Integer.parseInt(num[0])
							+ Integer.parseInt(num[1]) Integer.parseInt(num[0]) Integer.parseInt Integer num[0] num 0 Integer.parseInt(num[1]) Integer.parseInt Integer num[1] num 1 list.add(Integer.toString(sum).length()) list.add list Integer.toString(sum).length() Integer.toString(sum).length Integer.toString(sum) Integer.toString Integer sum {
					break;
				} break; for (int keta : list) {
				System.out.println(keta);
			} int keta list {
				System.out.println(keta);
			} {
				System.out.println(keta);
			} System.out.println(keta) System.out.println System.out System System.out keta String[] args args
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

class Main {

	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			List<Integer> list = new ArrayList<Integer>();
			String s;

			while ((s = br.readLine()) != null && list.size() <= 200) {

				String[] num = s.split(" ");
				if (0 <= Integer.parseInt(num[0])
						&& Integer.parseInt(num[1]) <= 1000000) {
					int sum = Integer.parseInt(num[0])
							+ Integer.parseInt(num[1]);
					list.add(Integer.toString(sum).length());
				}else {
					break;
				}
			}

			for (int keta : list) {
				System.out.println(keta);
			}

		} finally {
			br.close();
		}

	}
}