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

public class Main {
	public static void main(String[] a) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in), 1);
		String str = "";
		StringTokenizer st;
		int num = 0;
		while ((str = br.readLine()) != null) {
			st = new StringTokenizer(str, " ");
			num = Integer.parseInt(st.nextToken()) + Integer.parseInt(st.nextToken());
			str = String.valueOf(num);
			System.out.println(str.length());
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.StringTokenizer; StringTokenizer java.util public class Main {
	public static void main(String[] a) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in), 1);
		String str = "";
		StringTokenizer st;
		int num = 0;
		while ((str = br.readLine()) != null) {
			st = new StringTokenizer(str, " ");
			num = Integer.parseInt(st.nextToken()) + Integer.parseInt(st.nextToken());
			str = String.valueOf(num);
			System.out.println(str.length());
		}
	}
} Main public static void main(String[] a) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in), 1);
		String str = "";
		StringTokenizer st;
		int num = 0;
		while ((str = br.readLine()) != null) {
			st = new StringTokenizer(str, " ");
			num = Integer.parseInt(st.nextToken()) + Integer.parseInt(st.nextToken());
			str = String.valueOf(num);
			System.out.println(str.length());
		}
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in), 1);
		String str = "";
		StringTokenizer st;
		int num = 0;
		while ((str = br.readLine()) != null) {
			st = new StringTokenizer(str, " ");
			num = Integer.parseInt(st.nextToken()) + Integer.parseInt(st.nextToken());
			str = String.valueOf(num);
			System.out.println(str.length());
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in), 1); br new BufferedReader(new InputStreamReader(System.in), 1) String str = ""; str "" StringTokenizer st; st int num = 0; num 0 while ((str = br.readLine()) != null) {
			st = new StringTokenizer(str, " ");
			num = Integer.parseInt(st.nextToken()) + Integer.parseInt(st.nextToken());
			str = String.valueOf(num);
			System.out.println(str.length());
		} (str = br.readLine()) != null (str = br.readLine()) str br.readLine() br.readLine br null {
			st = new StringTokenizer(str, " ");
			num = Integer.parseInt(st.nextToken()) + Integer.parseInt(st.nextToken());
			str = String.valueOf(num);
			System.out.println(str.length());
		} st = new StringTokenizer(str, " ") st new StringTokenizer(str, " ") num = Integer.parseInt(st.nextToken()) + Integer.parseInt(st.nextToken()) num Integer.parseInt(st.nextToken()) + Integer.parseInt(st.nextToken()) Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st str = String.valueOf(num) str String.valueOf(num) String.valueOf String num System.out.println(str.length()) System.out.println System.out System System.out str.length() str.length str String[] a a public class Main {
	public static void main(String[] a) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in), 1);
		String str = "";
		StringTokenizer st;
		int num = 0;
		while ((str = br.readLine()) != null) {
			st = new StringTokenizer(str, " ");
			num = Integer.parseInt(st.nextToken()) + Integer.parseInt(st.nextToken());
			str = String.valueOf(num);
			System.out.println(str.length());
		}
	}
} public class Main {
	public static void main(String[] a) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in), 1);
		String str = "";
		StringTokenizer st;
		int num = 0;
		while ((str = br.readLine()) != null) {
			st = new StringTokenizer(str, " ");
			num = Integer.parseInt(st.nextToken()) + Integer.parseInt(st.nextToken());
			str = String.valueOf(num);
			System.out.println(str.length());
		}
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main {
	public static void main(String[] a) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in), 1);
		String str = "";
		StringTokenizer st;
		int num = 0;
		while ((str = br.readLine()) != null) {
			st = new StringTokenizer(str, " ");
			num = Integer.parseInt(st.nextToken()) + Integer.parseInt(st.nextToken());
			str = String.valueOf(num);
			System.out.println(str.length());
		}
	}
}