import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

    public static void main(String[] args) throws IOException {
        // TODO ?????????????????????????????????????????????
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        while(true){
            String tmpStr = br.readLine();
            if(tmpStr == null){
                break;
            }

            String[] tmpArray = tmpStr.split(" ");

            int num1 = Integer.parseInt(tmpArray[0]);
            int num2 = Integer.parseInt(tmpArray[1]);

            int sum = num1 + num2;

            System.out.println(Integer.toString(num1 + num2).length());
        }


    }

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

    public static void main(String[] args) throws IOException {
        // TODO ?????????????????????????????????????????????
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        while(true){
            String tmpStr = br.readLine();
            if(tmpStr == null){
                break;
            }

            String[] tmpArray = tmpStr.split(" ");

            int num1 = Integer.parseInt(tmpArray[0]);
            int num2 = Integer.parseInt(tmpArray[1]);

            int sum = num1 + num2;

            System.out.println(Integer.toString(num1 + num2).length());
        }


    }

} Main public static void main(String[] args) throws IOException {
        // TODO ?????????????????????????????????????????????
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        while(true){
            String tmpStr = br.readLine();
            if(tmpStr == null){
                break;
            }

            String[] tmpArray = tmpStr.split(" ");

            int num1 = Integer.parseInt(tmpArray[0]);
            int num2 = Integer.parseInt(tmpArray[1]);

            int sum = num1 + num2;

            System.out.println(Integer.toString(num1 + num2).length());
        }


    } main {
        // TODO ?????????????????????????????????????????????
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        while(true){
            String tmpStr = br.readLine();
            if(tmpStr == null){
                break;
            }

            String[] tmpArray = tmpStr.split(" ");

            int num1 = Integer.parseInt(tmpArray[0]);
            int num2 = Integer.parseInt(tmpArray[1]);

            int sum = num1 + num2;

            System.out.println(Integer.toString(num1 + num2).length());
        }


    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) while(true){
            String tmpStr = br.readLine();
            if(tmpStr == null){
                break;
            }

            String[] tmpArray = tmpStr.split(" ");

            int num1 = Integer.parseInt(tmpArray[0]);
            int num2 = Integer.parseInt(tmpArray[1]);

            int sum = num1 + num2;

            System.out.println(Integer.toString(num1 + num2).length());
        } true {
            String tmpStr = br.readLine();
            if(tmpStr == null){
                break;
            }

            String[] tmpArray = tmpStr.split(" ");

            int num1 = Integer.parseInt(tmpArray[0]);
            int num2 = Integer.parseInt(tmpArray[1]);

            int sum = num1 + num2;

            System.out.println(Integer.toString(num1 + num2).length());
        } String tmpStr = br.readLine(); tmpStr br.readLine() br.readLine br if(tmpStr == null){
                break;
            } tmpStr == null tmpStr null {
                break;
            } break; String[] tmpArray = tmpStr.split(" "); tmpArray tmpStr.split(" ") tmpStr.split tmpStr " " int num1 = Integer.parseInt(tmpArray[0]); num1 Integer.parseInt(tmpArray[0]) Integer.parseInt Integer tmpArray[0] tmpArray 0 int num2 = Integer.parseInt(tmpArray[1]); num2 Integer.parseInt(tmpArray[1]) Integer.parseInt Integer tmpArray[1] tmpArray 1 int sum = num1 + num2; sum num1 + num2 num1 num2 System.out.println(Integer.toString(num1 + num2).length()) System.out.println System.out System System.out Integer.toString(num1 + num2).length() Integer.toString(num1 + num2).length Integer.toString(num1 + num2) Integer.toString Integer num1 + num2 num1 num2 String[] args args public class Main {

    public static void main(String[] args) throws IOException {
        // TODO ?????????????????????????????????????????????
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        while(true){
            String tmpStr = br.readLine();
            if(tmpStr == null){
                break;
            }

            String[] tmpArray = tmpStr.split(" ");

            int num1 = Integer.parseInt(tmpArray[0]);
            int num2 = Integer.parseInt(tmpArray[1]);

            int sum = num1 + num2;

            System.out.println(Integer.toString(num1 + num2).length());
        }


    }

} public class Main {

    public static void main(String[] args) throws IOException {
        // TODO ?????????????????????????????????????????????
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        while(true){
            String tmpStr = br.readLine();
            if(tmpStr == null){
                break;
            }

            String[] tmpArray = tmpStr.split(" ");

            int num1 = Integer.parseInt(tmpArray[0]);
            int num2 = Integer.parseInt(tmpArray[1]);

            int sum = num1 + num2;

            System.out.println(Integer.toString(num1 + num2).length());
        }


    }

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

    public static void main(String[] args) throws IOException {
        // TODO ?????????????????????????????????????????????
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        while(true){
            String tmpStr = br.readLine();
            if(tmpStr == null){
                break;
            }

            String[] tmpArray = tmpStr.split(" ");

            int num1 = Integer.parseInt(tmpArray[0]);
            int num2 = Integer.parseInt(tmpArray[1]);

            int sum = num1 + num2;

            System.out.println(Integer.toString(num1 + num2).length());
        }


    }

}