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

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

		while((str = br.readLine()) != null) {
			String num[] = str.split(" ", 0);
			int x = Integer.parseInt(num[0]);
			int y = Integer.parseInt(num[1]);

			if(x <= 1000000 && y <= 1000000 ) {
				System.out.println(String.valueOf(x+y).length());
			}
		}

		br.close();
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;

		while((str = br.readLine()) != null) {
			String num[] = str.split(" ", 0);
			int x = Integer.parseInt(num[0]);
			int y = Integer.parseInt(num[1]);

			if(x <= 1000000 && y <= 1000000 ) {
				System.out.println(String.valueOf(x+y).length());
			}
		}

		br.close();
	}
} Main public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;

		while((str = br.readLine()) != null) {
			String num[] = str.split(" ", 0);
			int x = Integer.parseInt(num[0]);
			int y = Integer.parseInt(num[1]);

			if(x <= 1000000 && y <= 1000000 ) {
				System.out.println(String.valueOf(x+y).length());
			}
		}

		br.close();
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;

		while((str = br.readLine()) != null) {
			String num[] = str.split(" ", 0);
			int x = Integer.parseInt(num[0]);
			int y = Integer.parseInt(num[1]);

			if(x <= 1000000 && y <= 1000000 ) {
				System.out.println(String.valueOf(x+y).length());
			}
		}

		br.close();
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String str; str while((str = br.readLine()) != null) {
			String num[] = str.split(" ", 0);
			int x = Integer.parseInt(num[0]);
			int y = Integer.parseInt(num[1]);

			if(x <= 1000000 && y <= 1000000 ) {
				System.out.println(String.valueOf(x+y).length());
			}
		} (str = br.readLine()) != null (str = br.readLine()) str br.readLine() br.readLine br null {
			String num[] = str.split(" ", 0);
			int x = Integer.parseInt(num[0]);
			int y = Integer.parseInt(num[1]);

			if(x <= 1000000 && y <= 1000000 ) {
				System.out.println(String.valueOf(x+y).length());
			}
		} String num[] = str.split(" ", 0); num str.split(" ", 0) str.split str " " 0 int x = Integer.parseInt(num[0]); x Integer.parseInt(num[0]) Integer.parseInt Integer num[0] num 0 int y = Integer.parseInt(num[1]); y Integer.parseInt(num[1]) Integer.parseInt Integer num[1] num 1 if(x <= 1000000 && y <= 1000000 ) {
				System.out.println(String.valueOf(x+y).length());
			} x <= 1000000 && y <= 1000000 x <= 1000000 x 1000000 y <= 1000000 y 1000000 {
				System.out.println(String.valueOf(x+y).length());
			} System.out.println(String.valueOf(x+y).length()) System.out.println System.out System System.out String.valueOf(x+y).length() String.valueOf(x+y).length String.valueOf(x+y) String.valueOf String x+y x y br.close() br.close br String[] args args
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

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

		while((str = br.readLine()) != null) {
			String num[] = str.split(" ", 0);
			int x = Integer.parseInt(num[0]);
			int y = Integer.parseInt(num[1]);

			if(x <= 1000000 && y <= 1000000 ) {
				System.out.println(String.valueOf(x+y).length());
			}
		}

		br.close();
	}
}