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

public class Main {
	public static void main(String[] args) {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str;
		try {
			while ((str = br.readLine()) != null) {
				String[] num = str.split(" ");
				int a = Integer.parseInt(num[0]);
				int b = Integer.parseInt(num[1]);
				if (0 <= a && a <= 1000000 && 0 <= b && b <= 1000000) {
					System.out.println(Integer.toString(a + b).length());
				}
			}
		} catch (IOException e) {
			e.printStackTrace();
		}

	}
} 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[] args) {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str;
		try {
			while ((str = br.readLine()) != null) {
				String[] num = str.split(" ");
				int a = Integer.parseInt(num[0]);
				int b = Integer.parseInt(num[1]);
				if (0 <= a && a <= 1000000 && 0 <= b && b <= 1000000) {
					System.out.println(Integer.toString(a + b).length());
				}
			}
		} catch (IOException e) {
			e.printStackTrace();
		}

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

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str;
		try {
			while ((str = br.readLine()) != null) {
				String[] num = str.split(" ");
				int a = Integer.parseInt(num[0]);
				int b = Integer.parseInt(num[1]);
				if (0 <= a && a <= 1000000 && 0 <= b && b <= 1000000) {
					System.out.println(Integer.toString(a + b).length());
				}
			}
		} catch (IOException e) {
			e.printStackTrace();
		}

	} main {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str;
		try {
			while ((str = br.readLine()) != null) {
				String[] num = str.split(" ");
				int a = Integer.parseInt(num[0]);
				int b = Integer.parseInt(num[1]);
				if (0 <= a && a <= 1000000 && 0 <= b && b <= 1000000) {
					System.out.println(Integer.toString(a + b).length());
				}
			}
		} catch (IOException e) {
			e.printStackTrace();
		}

	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String str; str try {
			while ((str = br.readLine()) != null) {
				String[] num = str.split(" ");
				int a = Integer.parseInt(num[0]);
				int b = Integer.parseInt(num[1]);
				if (0 <= a && a <= 1000000 && 0 <= b && b <= 1000000) {
					System.out.println(Integer.toString(a + b).length());
				}
			}
		} catch (IOException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		} IOException e {
			e.printStackTrace();
		} e.printStackTrace() e.printStackTrace e {
			while ((str = br.readLine()) != null) {
				String[] num = str.split(" ");
				int a = Integer.parseInt(num[0]);
				int b = Integer.parseInt(num[1]);
				if (0 <= a && a <= 1000000 && 0 <= b && b <= 1000000) {
					System.out.println(Integer.toString(a + b).length());
				}
			}
		} while ((str = br.readLine()) != null) {
				String[] num = str.split(" ");
				int a = Integer.parseInt(num[0]);
				int b = Integer.parseInt(num[1]);
				if (0 <= a && a <= 1000000 && 0 <= b && b <= 1000000) {
					System.out.println(Integer.toString(a + b).length());
				}
			} (str = br.readLine()) != null (str = br.readLine()) str br.readLine() br.readLine br null {
				String[] num = str.split(" ");
				int a = Integer.parseInt(num[0]);
				int b = Integer.parseInt(num[1]);
				if (0 <= a && a <= 1000000 && 0 <= b && b <= 1000000) {
					System.out.println(Integer.toString(a + b).length());
				}
			} String[] num = str.split(" "); num str.split(" ") str.split str " " int a = Integer.parseInt(num[0]); a Integer.parseInt(num[0]) Integer.parseInt Integer num[0] num 0 int b = Integer.parseInt(num[1]); b Integer.parseInt(num[1]) Integer.parseInt Integer num[1] num 1 if (0 <= a && a <= 1000000 && 0 <= b && b <= 1000000) {
					System.out.println(Integer.toString(a + b).length());
				} 0 <= a && a <= 1000000 && 0 <= b && b <= 1000000 0 <= b 0 <= a && a <= 1000000 && 0 <= b && b <= 1000000 0 <= a 0 a a <= 1000000 a 1000000 0 <= b 0 b b <= 1000000 b 1000000 {
					System.out.println(Integer.toString(a + b).length());
				} System.out.println(Integer.toString(a + b).length()) System.out.println System.out System System.out Integer.toString(a + b).length() Integer.toString(a + b).length Integer.toString(a + b) Integer.toString Integer a + b a b String[] args args public class Main {
	public static void main(String[] args) {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str;
		try {
			while ((str = br.readLine()) != null) {
				String[] num = str.split(" ");
				int a = Integer.parseInt(num[0]);
				int b = Integer.parseInt(num[1]);
				if (0 <= a && a <= 1000000 && 0 <= b && b <= 1000000) {
					System.out.println(Integer.toString(a + b).length());
				}
			}
		} catch (IOException e) {
			e.printStackTrace();
		}

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

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str;
		try {
			while ((str = br.readLine()) != null) {
				String[] num = str.split(" ");
				int a = Integer.parseInt(num[0]);
				int b = Integer.parseInt(num[1]);
				if (0 <= a && a <= 1000000 && 0 <= b && b <= 1000000) {
					System.out.println(Integer.toString(a + b).length());
				}
			}
		} catch (IOException e) {
			e.printStackTrace();
		}

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

public class Main {
	public static void main(String[] args) {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str;
		try {
			while ((str = br.readLine()) != null) {
				String[] num = str.split(" ");
				int a = Integer.parseInt(num[0]);
				int b = Integer.parseInt(num[1]);
				if (0 <= a && a <= 1000000 && 0 <= b && b <= 1000000) {
					System.out.println(Integer.toString(a + b).length());
				}
			}
		} catch (IOException e) {
			e.printStackTrace();
		}

	}
}