import java.util.*;
import java.lang.*;
import java.io.*;

class Main{
	public static void main (String[] args) throws Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line;
		while((line = br.readLine()) != null){
			String[] strs = line.split(" ", 2);
			int num1 = Integer.parseInt(strs[0]);
			int num2 = Integer.parseInt(strs[1]);
			int num = num1 + num2;
			String str = String.valueOf(num);
			System.out.println(str.length());
		}
	}
} import java.util.*; util.* java import java.lang.*; lang.* java import java.io.*; io.* java class Main{
	public static void main (String[] args) throws Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line;
		while((line = br.readLine()) != null){
			String[] strs = line.split(" ", 2);
			int num1 = Integer.parseInt(strs[0]);
			int num2 = Integer.parseInt(strs[1]);
			int num = num1 + num2;
			String str = String.valueOf(num);
			System.out.println(str.length());
		}
	}
} Main public static void main (String[] args) throws Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line;
		while((line = br.readLine()) != null){
			String[] strs = line.split(" ", 2);
			int num1 = Integer.parseInt(strs[0]);
			int num2 = Integer.parseInt(strs[1]);
			int num = num1 + num2;
			String str = String.valueOf(num);
			System.out.println(str.length());
		}
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line;
		while((line = br.readLine()) != null){
			String[] strs = line.split(" ", 2);
			int num1 = Integer.parseInt(strs[0]);
			int num2 = Integer.parseInt(strs[1]);
			int num = num1 + num2;
			String str = String.valueOf(num);
			System.out.println(str.length());
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String line; line while((line = br.readLine()) != null){
			String[] strs = line.split(" ", 2);
			int num1 = Integer.parseInt(strs[0]);
			int num2 = Integer.parseInt(strs[1]);
			int num = num1 + num2;
			String str = String.valueOf(num);
			System.out.println(str.length());
		} (line = br.readLine()) != null (line = br.readLine()) line br.readLine() br.readLine br null {
			String[] strs = line.split(" ", 2);
			int num1 = Integer.parseInt(strs[0]);
			int num2 = Integer.parseInt(strs[1]);
			int num = num1 + num2;
			String str = String.valueOf(num);
			System.out.println(str.length());
		} String[] strs = line.split(" ", 2); strs line.split(" ", 2) line.split line " " 2 int num1 = Integer.parseInt(strs[0]); num1 Integer.parseInt(strs[0]) Integer.parseInt Integer strs[0] strs 0 int num2 = Integer.parseInt(strs[1]); num2 Integer.parseInt(strs[1]) Integer.parseInt Integer strs[1] strs 1 int num = num1 + num2; num num1 + num2 num1 num2 String 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[] args args
import java.util.*;
import java.lang.*;
import java.io.*;

class Main{
	public static void main (String[] args) throws Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line;
		while((line = br.readLine()) != null){
			String[] strs = line.split(" ", 2);
			int num1 = Integer.parseInt(strs[0]);
			int num2 = Integer.parseInt(strs[1]);
			int num = num1 + num2;
			String str = String.valueOf(num);
			System.out.println(str.length());
		}
	}
}