import static java.lang.Integer.parseInt;
import java.io.*;

class Main{
    public static void main(String[] a) throws IOException{

        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        String s;

        while((s = input.readLine())!=null){
            String[] num = s.split(" ",0);
            int x = parseInt(num[0]);
            int y = parseInt(num[1]);
            if(0 <= x && x <=1000000 && 0 <= y && y <= 1000000){
                int z = x + y;
                System.out.println(Integer.toString(z).length());
            }
        }
    }
} import static java.lang.Integer.parseInt; import static java.lang.Integer.parseInt; import static java.lang.Integer.parseInt; import java.io.*; io.* java class Main{
    public static void main(String[] a) throws IOException{

        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        String s;

        while((s = input.readLine())!=null){
            String[] num = s.split(" ",0);
            int x = parseInt(num[0]);
            int y = parseInt(num[1]);
            if(0 <= x && x <=1000000 && 0 <= y && y <= 1000000){
                int z = x + y;
                System.out.println(Integer.toString(z).length());
            }
        }
    }
} Main public static void main(String[] a) throws IOException{

        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        String s;

        while((s = input.readLine())!=null){
            String[] num = s.split(" ",0);
            int x = parseInt(num[0]);
            int y = parseInt(num[1]);
            if(0 <= x && x <=1000000 && 0 <= y && y <= 1000000){
                int z = x + y;
                System.out.println(Integer.toString(z).length());
            }
        }
    } main {

        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        String s;

        while((s = input.readLine())!=null){
            String[] num = s.split(" ",0);
            int x = parseInt(num[0]);
            int y = parseInt(num[1]);
            if(0 <= x && x <=1000000 && 0 <= y && y <= 1000000){
                int z = x + y;
                System.out.println(Integer.toString(z).length());
            }
        }
    } BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); input new BufferedReader(new InputStreamReader(System.in)) String s; s while((s = input.readLine())!=null){
            String[] num = s.split(" ",0);
            int x = parseInt(num[0]);
            int y = parseInt(num[1]);
            if(0 <= x && x <=1000000 && 0 <= y && y <= 1000000){
                int z = x + y;
                System.out.println(Integer.toString(z).length());
            }
        } (s = input.readLine())!=null (s = input.readLine()) s input.readLine() input.readLine input null {
            String[] num = s.split(" ",0);
            int x = parseInt(num[0]);
            int y = parseInt(num[1]);
            if(0 <= x && x <=1000000 && 0 <= y && y <= 1000000){
                int z = x + y;
                System.out.println(Integer.toString(z).length());
            }
        } String[] num = s.split(" ",0); num s.split(" ",0) s.split s " " 0 int x = parseInt(num[0]); x parseInt(num[0]) parseInt num[0] num 0 int y = parseInt(num[1]); y parseInt(num[1]) parseInt num[1] num 1 if(0 <= x && x <=1000000 && 0 <= y && y <= 1000000){
                int z = x + y;
                System.out.println(Integer.toString(z).length());
            } 0 <= x && x <=1000000 && 0 <= y && y <= 1000000 0 <= y 0 <= x && x <=1000000 && 0 <= y && y <= 1000000 0 <= x 0 x x <=1000000 x 1000000 0 <= y 0 y y <= 1000000 y 1000000 {
                int z = x + y;
                System.out.println(Integer.toString(z).length());
            } int z = x + y; z x + y x y System.out.println(Integer.toString(z).length()) System.out.println System.out System System.out Integer.toString(z).length() Integer.toString(z).length Integer.toString(z) Integer.toString Integer z String[] a a
import static java.lang.Integer.parseInt;
import java.io.*;

class Main{
    public static void main(String[] a) throws IOException{

        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        String s;

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