import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            String[] array = sc.nextLine().split("[\\s]");
            int n1 = Integer.parseInt(array[0]);
            int n2 = Integer.parseInt(array[1]);

            int num = n1 + n2;
            System.out.println(Integer.toString(num).length());
        }
        sc.close();

    }

} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            String[] array = sc.nextLine().split("[\\s]");
            int n1 = Integer.parseInt(array[0]);
            int n2 = Integer.parseInt(array[1]);

            int num = n1 + n2;
            System.out.println(Integer.toString(num).length());
        }
        sc.close();

    }

} Main public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            String[] array = sc.nextLine().split("[\\s]");
            int n1 = Integer.parseInt(array[0]);
            int n2 = Integer.parseInt(array[1]);

            int num = n1 + n2;
            System.out.println(Integer.toString(num).length());
        }
        sc.close();

    } main {

        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            String[] array = sc.nextLine().split("[\\s]");
            int n1 = Integer.parseInt(array[0]);
            int n2 = Integer.parseInt(array[1]);

            int num = n1 + n2;
            System.out.println(Integer.toString(num).length());
        }
        sc.close();

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while (sc.hasNext()) {
            String[] array = sc.nextLine().split("[\\s]");
            int n1 = Integer.parseInt(array[0]);
            int n2 = Integer.parseInt(array[1]);

            int num = n1 + n2;
            System.out.println(Integer.toString(num).length());
        } sc.hasNext() sc.hasNext sc {
            String[] array = sc.nextLine().split("[\\s]");
            int n1 = Integer.parseInt(array[0]);
            int n2 = Integer.parseInt(array[1]);

            int num = n1 + n2;
            System.out.println(Integer.toString(num).length());
        } String[] array = sc.nextLine().split("[\\s]"); array sc.nextLine().split("[\\s]") sc.nextLine().split sc.nextLine() sc.nextLine sc "[\\s]" int n1 = Integer.parseInt(array[0]); n1 Integer.parseInt(array[0]) Integer.parseInt Integer array[0] array 0 int n2 = Integer.parseInt(array[1]); n2 Integer.parseInt(array[1]) Integer.parseInt Integer array[1] array 1 int num = n1 + n2; num n1 + n2 n1 n2 System.out.println(Integer.toString(num).length()) System.out.println System.out System System.out Integer.toString(num).length() Integer.toString(num).length Integer.toString(num) Integer.toString Integer num sc.close() sc.close sc String[] args args public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            String[] array = sc.nextLine().split("[\\s]");
            int n1 = Integer.parseInt(array[0]);
            int n2 = Integer.parseInt(array[1]);

            int num = n1 + n2;
            System.out.println(Integer.toString(num).length());
        }
        sc.close();

    }

} public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            String[] array = sc.nextLine().split("[\\s]");
            int n1 = Integer.parseInt(array[0]);
            int n2 = Integer.parseInt(array[1]);

            int num = n1 + n2;
            System.out.println(Integer.toString(num).length());
        }
        sc.close();

    }

} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            String[] array = sc.nextLine().split("[\\s]");
            int n1 = Integer.parseInt(array[0]);
            int n2 = Integer.parseInt(array[1]);

            int num = n1 + n2;
            System.out.println(Integer.toString(num).length());
        }
        sc.close();

    }

}