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

class Main{
    public static void main(String[] a) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line;
        while((line = br.readLine()) != null){
            String[] check = line.split(" ");
            int val1 = Integer.parseInt(check[0]);
            int val2 = Integer.parseInt(check[1]);
            int sum = val1 + val2;
            String str = String.valueOf(sum);
            System.out.println(str.length());
        }
    }
} import java.io.*; io.* java import java.util.*; util.* java class Main{
    public static void main(String[] a) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line;
        while((line = br.readLine()) != null){
            String[] check = line.split(" ");
            int val1 = Integer.parseInt(check[0]);
            int val2 = Integer.parseInt(check[1]);
            int sum = val1 + val2;
            String str = String.valueOf(sum);
            System.out.println(str.length());
        }
    }
} Main public static void main(String[] a) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line;
        while((line = br.readLine()) != null){
            String[] check = line.split(" ");
            int val1 = Integer.parseInt(check[0]);
            int val2 = Integer.parseInt(check[1]);
            int sum = val1 + val2;
            String str = String.valueOf(sum);
            System.out.println(str.length());
        }
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line;
        while((line = br.readLine()) != null){
            String[] check = line.split(" ");
            int val1 = Integer.parseInt(check[0]);
            int val2 = Integer.parseInt(check[1]);
            int sum = val1 + val2;
            String str = String.valueOf(sum);
            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[] check = line.split(" ");
            int val1 = Integer.parseInt(check[0]);
            int val2 = Integer.parseInt(check[1]);
            int sum = val1 + val2;
            String str = String.valueOf(sum);
            System.out.println(str.length());
        } (line = br.readLine()) != null (line = br.readLine()) line br.readLine() br.readLine br null {
            String[] check = line.split(" ");
            int val1 = Integer.parseInt(check[0]);
            int val2 = Integer.parseInt(check[1]);
            int sum = val1 + val2;
            String str = String.valueOf(sum);
            System.out.println(str.length());
        } String[] check = line.split(" "); check line.split(" ") line.split line " " int val1 = Integer.parseInt(check[0]); val1 Integer.parseInt(check[0]) Integer.parseInt Integer check[0] check 0 int val2 = Integer.parseInt(check[1]); val2 Integer.parseInt(check[1]) Integer.parseInt Integer check[1] check 1 int sum = val1 + val2; sum val1 + val2 val1 val2 String str = String.valueOf(sum); str String.valueOf(sum) String.valueOf String sum System.out.println(str.length()) System.out.println System.out System System.out str.length() str.length str String[] a a
import java.io.*;
import java.util.*;

class Main{
    public static void main(String[] a) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line;
        while((line = br.readLine()) != null){
            String[] check = line.split(" ");
            int val1 = Integer.parseInt(check[0]);
            int val2 = Integer.parseInt(check[1]);
            int sum = val1 + val2;
            String str = String.valueOf(sum);
            System.out.println(str.length());
        }
    }
}