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

class Main{
    public static void main(String[] args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String s;
        int num = 0;
        while((s=br.readLine())!=null){
            String[] str = s.split(" ");
            if(!(Integer.parseInt(str[0])>=0 && Integer.parseInt(str[0])<=1000000)){
                if(Integer.parseInt(str[1])>=0 && Integer.parseInt(str[1])<=1000000){
                    continue;
                }
            }
            num = Integer.parseInt(str[0]) + Integer.parseInt(str[1]);
            //System.out.println(str[0]+"\t"+str[1] + "\t"+num);
            int a = String.valueOf(num).length();
            System.out.println(a);
        }
        
        
    }
} import java.util.*; util.* java import java.io.*; io.* java class Main{
    public static void main(String[] args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String s;
        int num = 0;
        while((s=br.readLine())!=null){
            String[] str = s.split(" ");
            if(!(Integer.parseInt(str[0])>=0 && Integer.parseInt(str[0])<=1000000)){
                if(Integer.parseInt(str[1])>=0 && Integer.parseInt(str[1])<=1000000){
                    continue;
                }
            }
            num = Integer.parseInt(str[0]) + Integer.parseInt(str[1]);
            //System.out.println(str[0]+"\t"+str[1] + "\t"+num);
            int a = String.valueOf(num).length();
            System.out.println(a);
        }
        
        
    }
} Main public static void main(String[] args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String s;
        int num = 0;
        while((s=br.readLine())!=null){
            String[] str = s.split(" ");
            if(!(Integer.parseInt(str[0])>=0 && Integer.parseInt(str[0])<=1000000)){
                if(Integer.parseInt(str[1])>=0 && Integer.parseInt(str[1])<=1000000){
                    continue;
                }
            }
            num = Integer.parseInt(str[0]) + Integer.parseInt(str[1]);
            //System.out.println(str[0]+"\t"+str[1] + "\t"+num);
            int a = String.valueOf(num).length();
            System.out.println(a);
        }
        
        
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String s;
        int num = 0;
        while((s=br.readLine())!=null){
            String[] str = s.split(" ");
            if(!(Integer.parseInt(str[0])>=0 && Integer.parseInt(str[0])<=1000000)){
                if(Integer.parseInt(str[1])>=0 && Integer.parseInt(str[1])<=1000000){
                    continue;
                }
            }
            num = Integer.parseInt(str[0]) + Integer.parseInt(str[1]);
            //System.out.println(str[0]+"\t"+str[1] + "\t"+num);
            int a = String.valueOf(num).length();
            System.out.println(a);
        }
        
        
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String s; s int num = 0; num 0 while((s=br.readLine())!=null){
            String[] str = s.split(" ");
            if(!(Integer.parseInt(str[0])>=0 && Integer.parseInt(str[0])<=1000000)){
                if(Integer.parseInt(str[1])>=0 && Integer.parseInt(str[1])<=1000000){
                    continue;
                }
            }
            num = Integer.parseInt(str[0]) + Integer.parseInt(str[1]);
            //System.out.println(str[0]+"\t"+str[1] + "\t"+num);
            int a = String.valueOf(num).length();
            System.out.println(a);
        } (s=br.readLine())!=null (s=br.readLine()) s br.readLine() br.readLine br null {
            String[] str = s.split(" ");
            if(!(Integer.parseInt(str[0])>=0 && Integer.parseInt(str[0])<=1000000)){
                if(Integer.parseInt(str[1])>=0 && Integer.parseInt(str[1])<=1000000){
                    continue;
                }
            }
            num = Integer.parseInt(str[0]) + Integer.parseInt(str[1]);
            //System.out.println(str[0]+"\t"+str[1] + "\t"+num);
            int a = String.valueOf(num).length();
            System.out.println(a);
        } String[] str = s.split(" "); str s.split(" ") s.split s " " if(!(Integer.parseInt(str[0])>=0 && Integer.parseInt(str[0])<=1000000)){
                if(Integer.parseInt(str[1])>=0 && Integer.parseInt(str[1])<=1000000){
                    continue;
                }
            } !(Integer.parseInt(str[0])>=0 && Integer.parseInt(str[0])<=1000000) (Integer.parseInt(str[0])>=0 && Integer.parseInt(str[0])<=1000000) Integer.parseInt(str[0])>=0 Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 0 Integer.parseInt(str[0])<=1000000 Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 1000000 {
                if(Integer.parseInt(str[1])>=0 && Integer.parseInt(str[1])<=1000000){
                    continue;
                }
            } if(Integer.parseInt(str[1])>=0 && Integer.parseInt(str[1])<=1000000){
                    continue;
                } Integer.parseInt(str[1])>=0 && Integer.parseInt(str[1])<=1000000 Integer.parseInt(str[1])>=0 Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 0 Integer.parseInt(str[1])<=1000000 Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 1000000 {
                    continue;
                } continue; num = Integer.parseInt(str[0]) + Integer.parseInt(str[1]) num Integer.parseInt(str[0]) + Integer.parseInt(str[1]) Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 int a = String.valueOf(num).length(); a String.valueOf(num).length() String.valueOf(num).length String.valueOf(num) String.valueOf String num System.out.println(a) System.out.println System.out System System.out a String[] args args
import java.util.*;
import java.io.*;

class Main{
    public static void main(String[] args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String s;
        int num = 0;
        while((s=br.readLine())!=null){
            String[] str = s.split(" ");
            if(!(Integer.parseInt(str[0])>=0 && Integer.parseInt(str[0])<=1000000)){
                if(Integer.parseInt(str[1])>=0 && Integer.parseInt(str[1])<=1000000){
                    continue;
                }
            }
            num = Integer.parseInt(str[0]) + Integer.parseInt(str[1]);
            //System.out.println(str[0]+"\t"+str[1] + "\t"+num);
            int a = String.valueOf(num).length();
            System.out.println(a);
        }
        
        
    }
}