import java.util.*;

public class Main {
    Scanner in = new Scanner(System.in);
    public static void main(String[] args) {
        new Main();
    }

    public Main(){
    	new AOJ().doIt();
    }
    
    class AOJ{
    	void doIt(){
    		while(in.hasNext()){
    			int a = in.nextInt();
        		int b = in.nextInt();
        		System.out.println(Integer.toString(a+b).length());
    		}
    	}
    }
    
} import java.util.*; util.* java public class Main {
    Scanner in = new Scanner(System.in);
    public static void main(String[] args) {
        new Main();
    }

    public Main(){
    	new AOJ().doIt();
    }
    
    class AOJ{
    	void doIt(){
    		while(in.hasNext()){
    			int a = in.nextInt();
        		int b = in.nextInt();
        		System.out.println(Integer.toString(a+b).length());
    		}
    	}
    }
    
} Main Scanner in = new Scanner(System.in); in new Scanner(System.in) public static void main(String[] args) {
        new Main();
    } main {
        new Main();
    } new Main() String[] args args public Main(){
    	new AOJ().doIt();
    } Main {
    	new AOJ().doIt();
    } new AOJ().doIt() new AOJ().doIt new AOJ() class AOJ{
    	void doIt(){
    		while(in.hasNext()){
    			int a = in.nextInt();
        		int b = in.nextInt();
        		System.out.println(Integer.toString(a+b).length());
    		}
    	}
    } AOJ void doIt(){
    		while(in.hasNext()){
    			int a = in.nextInt();
        		int b = in.nextInt();
        		System.out.println(Integer.toString(a+b).length());
    		}
    	} doIt {
    		while(in.hasNext()){
    			int a = in.nextInt();
        		int b = in.nextInt();
        		System.out.println(Integer.toString(a+b).length());
    		}
    	} while(in.hasNext()){
    			int a = in.nextInt();
        		int b = in.nextInt();
        		System.out.println(Integer.toString(a+b).length());
    		} in.hasNext() in.hasNext in {
    			int a = in.nextInt();
        		int b = in.nextInt();
        		System.out.println(Integer.toString(a+b).length());
    		} int a = in.nextInt(); a in.nextInt() in.nextInt in int b = in.nextInt(); b in.nextInt() in.nextInt in System.out.println(Integer.toString(a+b).length()) System.out.println System.out System System.out Integer.toString(a+b).length() Integer.toString(a+b).length Integer.toString(a+b) Integer.toString Integer a+b a b public class Main {
    Scanner in = new Scanner(System.in);
    public static void main(String[] args) {
        new Main();
    }

    public Main(){
    	new AOJ().doIt();
    }
    
    class AOJ{
    	void doIt(){
    		while(in.hasNext()){
    			int a = in.nextInt();
        		int b = in.nextInt();
        		System.out.println(Integer.toString(a+b).length());
    		}
    	}
    }
    
} public class Main {
    Scanner in = new Scanner(System.in);
    public static void main(String[] args) {
        new Main();
    }

    public Main(){
    	new AOJ().doIt();
    }
    
    class AOJ{
    	void doIt(){
    		while(in.hasNext()){
    			int a = in.nextInt();
        		int b = in.nextInt();
        		System.out.println(Integer.toString(a+b).length());
    		}
    	}
    }
    
} Main
import java.util.*;

public class Main {
    Scanner in = new Scanner(System.in);
    public static void main(String[] args) {
        new Main();
    }

    public Main(){
    	new AOJ().doIt();
    }
    
    class AOJ{
    	void doIt(){
    		while(in.hasNext()){
    			int a = in.nextInt();
        		int b = in.nextInt();
        		System.out.println(Integer.toString(a+b).length());
    		}
    	}
    }
    
}