import java.io.*;
import java.util.StringTokenizer;

class Main {
	public static void main(String args[]) {
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		String buf;

		try {
			while ((buf = br.readLine())!=null) {
				StringTokenizer st = new StringTokenizer(buf);
				int a = Integer.parseInt(st.nextToken());
				int b = Integer.parseInt(st.nextToken());
				String s = Integer.toString(a+b);
				System.out.println(s.length());
			}
		} catch (Exception e) {
			System.out.println("Exception!");
		}
	}
} import java.io.*; io.* java import java.util.StringTokenizer; StringTokenizer java.util class Main {
	public static void main(String args[]) {
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		String buf;

		try {
			while ((buf = br.readLine())!=null) {
				StringTokenizer st = new StringTokenizer(buf);
				int a = Integer.parseInt(st.nextToken());
				int b = Integer.parseInt(st.nextToken());
				String s = Integer.toString(a+b);
				System.out.println(s.length());
			}
		} catch (Exception e) {
			System.out.println("Exception!");
		}
	}
} Main public static void main(String args[]) {
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		String buf;

		try {
			while ((buf = br.readLine())!=null) {
				StringTokenizer st = new StringTokenizer(buf);
				int a = Integer.parseInt(st.nextToken());
				int b = Integer.parseInt(st.nextToken());
				String s = Integer.toString(a+b);
				System.out.println(s.length());
			}
		} catch (Exception e) {
			System.out.println("Exception!");
		}
	} main {
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		String buf;

		try {
			while ((buf = br.readLine())!=null) {
				StringTokenizer st = new StringTokenizer(buf);
				int a = Integer.parseInt(st.nextToken());
				int b = Integer.parseInt(st.nextToken());
				String s = Integer.toString(a+b);
				System.out.println(s.length());
			}
		} catch (Exception e) {
			System.out.println("Exception!");
		}
	} InputStreamReader isr = new InputStreamReader(System.in); isr new InputStreamReader(System.in) BufferedReader br = new BufferedReader(isr); br new BufferedReader(isr) String buf; buf try {
			while ((buf = br.readLine())!=null) {
				StringTokenizer st = new StringTokenizer(buf);
				int a = Integer.parseInt(st.nextToken());
				int b = Integer.parseInt(st.nextToken());
				String s = Integer.toString(a+b);
				System.out.println(s.length());
			}
		} catch (Exception e) {
			System.out.println("Exception!");
		} catch (Exception e) {
			System.out.println("Exception!");
		} Exception e {
			System.out.println("Exception!");
		} System.out.println("Exception!") System.out.println System.out System System.out "Exception!" {
			while ((buf = br.readLine())!=null) {
				StringTokenizer st = new StringTokenizer(buf);
				int a = Integer.parseInt(st.nextToken());
				int b = Integer.parseInt(st.nextToken());
				String s = Integer.toString(a+b);
				System.out.println(s.length());
			}
		} while ((buf = br.readLine())!=null) {
				StringTokenizer st = new StringTokenizer(buf);
				int a = Integer.parseInt(st.nextToken());
				int b = Integer.parseInt(st.nextToken());
				String s = Integer.toString(a+b);
				System.out.println(s.length());
			} (buf = br.readLine())!=null (buf = br.readLine()) buf br.readLine() br.readLine br null {
				StringTokenizer st = new StringTokenizer(buf);
				int a = Integer.parseInt(st.nextToken());
				int b = Integer.parseInt(st.nextToken());
				String s = Integer.toString(a+b);
				System.out.println(s.length());
			} StringTokenizer st = new StringTokenizer(buf); st new StringTokenizer(buf) int a = Integer.parseInt(st.nextToken()); a Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st int b = Integer.parseInt(st.nextToken()); b Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st String s = Integer.toString(a+b); s Integer.toString(a+b) Integer.toString Integer a+b a b System.out.println(s.length()) System.out.println System.out System System.out s.length() s.length s String args[] args
import java.io.*;
import java.util.StringTokenizer;

class Main {
	public static void main(String args[]) {
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		String buf;

		try {
			while ((buf = br.readLine())!=null) {
				StringTokenizer st = new StringTokenizer(buf);
				int a = Integer.parseInt(st.nextToken());
				int b = Integer.parseInt(st.nextToken());
				String s = Integer.toString(a+b);
				System.out.println(s.length());
			}
		} catch (Exception e) {
			System.out.println("Exception!");
		}
	}
}