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

class Main {
	public static void main(String[] args) {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);
		ArrayList<Integer> output = new ArrayList<Integer>();
		String input;
		try {
			while ((input = br.readLine()) != null) {
				int a = Integer.parseInt(input.split(" ")[0]);
				int b = Integer.parseInt(input.split(" ")[1]);
				int c = a + b;
				output.add(Integer.toString(c).length());
			}
			for(int i: output){
				System.out.println(i);
			}
		} catch (IOException e) {
			System.out.println(e);
		}
	}
} 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 class Main {
	public static void main(String[] args) {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);
		ArrayList<Integer> output = new ArrayList<Integer>();
		String input;
		try {
			while ((input = br.readLine()) != null) {
				int a = Integer.parseInt(input.split(" ")[0]);
				int b = Integer.parseInt(input.split(" ")[1]);
				int c = a + b;
				output.add(Integer.toString(c).length());
			}
			for(int i: output){
				System.out.println(i);
			}
		} catch (IOException e) {
			System.out.println(e);
		}
	}
} Main public static void main(String[] args) {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);
		ArrayList<Integer> output = new ArrayList<Integer>();
		String input;
		try {
			while ((input = br.readLine()) != null) {
				int a = Integer.parseInt(input.split(" ")[0]);
				int b = Integer.parseInt(input.split(" ")[1]);
				int c = a + b;
				output.add(Integer.toString(c).length());
			}
			for(int i: output){
				System.out.println(i);
			}
		} catch (IOException e) {
			System.out.println(e);
		}
	} main {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);
		ArrayList<Integer> output = new ArrayList<Integer>();
		String input;
		try {
			while ((input = br.readLine()) != null) {
				int a = Integer.parseInt(input.split(" ")[0]);
				int b = Integer.parseInt(input.split(" ")[1]);
				int c = a + b;
				output.add(Integer.toString(c).length());
			}
			for(int i: output){
				System.out.println(i);
			}
		} catch (IOException e) {
			System.out.println(e);
		}
	} InputStreamReader is = new InputStreamReader(System.in); is new InputStreamReader(System.in) BufferedReader br = new BufferedReader(is); br new BufferedReader(is) ArrayList<Integer> output = new ArrayList<Integer>(); output new ArrayList<Integer>() String input; input try {
			while ((input = br.readLine()) != null) {
				int a = Integer.parseInt(input.split(" ")[0]);
				int b = Integer.parseInt(input.split(" ")[1]);
				int c = a + b;
				output.add(Integer.toString(c).length());
			}
			for(int i: output){
				System.out.println(i);
			}
		} catch (IOException e) {
			System.out.println(e);
		} catch (IOException e) {
			System.out.println(e);
		} IOException e {
			System.out.println(e);
		} System.out.println(e) System.out.println System.out System System.out e {
			while ((input = br.readLine()) != null) {
				int a = Integer.parseInt(input.split(" ")[0]);
				int b = Integer.parseInt(input.split(" ")[1]);
				int c = a + b;
				output.add(Integer.toString(c).length());
			}
			for(int i: output){
				System.out.println(i);
			}
		} while ((input = br.readLine()) != null) {
				int a = Integer.parseInt(input.split(" ")[0]);
				int b = Integer.parseInt(input.split(" ")[1]);
				int c = a + b;
				output.add(Integer.toString(c).length());
			} (input = br.readLine()) != null (input = br.readLine()) input br.readLine() br.readLine br null {
				int a = Integer.parseInt(input.split(" ")[0]);
				int b = Integer.parseInt(input.split(" ")[1]);
				int c = a + b;
				output.add(Integer.toString(c).length());
			} int a = Integer.parseInt(input.split(" ")[0]); a Integer.parseInt(input.split(" ")[0]) Integer.parseInt Integer input.split(" ")[0] input.split(" ") input.split input " " 0 int b = Integer.parseInt(input.split(" ")[1]); b Integer.parseInt(input.split(" ")[1]) Integer.parseInt Integer input.split(" ")[1] input.split(" ") input.split input " " 1 int c = a + b; c a + b a b output.add(Integer.toString(c).length()) output.add output Integer.toString(c).length() Integer.toString(c).length Integer.toString(c) Integer.toString Integer c for(int i: output){
				System.out.println(i);
			} int i output {
				System.out.println(i);
			} {
				System.out.println(i);
			} System.out.println(i) System.out.println System.out System System.out i String[] args args
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;

class Main {
	public static void main(String[] args) {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);
		ArrayList<Integer> output = new ArrayList<Integer>();
		String input;
		try {
			while ((input = br.readLine()) != null) {
				int a = Integer.parseInt(input.split(" ")[0]);
				int b = Integer.parseInt(input.split(" ")[1]);
				int c = a + b;
				output.add(Integer.toString(c).length());
			}
			for(int i: output){
				System.out.println(i);
			}
		} catch (IOException e) {
			System.out.println(e);
		}
	}
}