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

public class Main {
    public static void main(String[] args) {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int[] top3 = new int[3];
        String line;
        try {
            while((line = br.readLine()) != null){
                String[] numbers = line.trim().split(" ");
                int a = Integer.parseInt(numbers[0]);
                int b = Integer.parseInt(numbers[1]);
                System.out.println(Integer.toString(a+b).length());
            }
        } catch (IOException e) {
        }
    }
} 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) {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int[] top3 = new int[3];
        String line;
        try {
            while((line = br.readLine()) != null){
                String[] numbers = line.trim().split(" ");
                int a = Integer.parseInt(numbers[0]);
                int b = Integer.parseInt(numbers[1]);
                System.out.println(Integer.toString(a+b).length());
            }
        } catch (IOException e) {
        }
    }
} Main public static void main(String[] args) {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int[] top3 = new int[3];
        String line;
        try {
            while((line = br.readLine()) != null){
                String[] numbers = line.trim().split(" ");
                int a = Integer.parseInt(numbers[0]);
                int b = Integer.parseInt(numbers[1]);
                System.out.println(Integer.toString(a+b).length());
            }
        } catch (IOException e) {
        }
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int[] top3 = new int[3];
        String line;
        try {
            while((line = br.readLine()) != null){
                String[] numbers = line.trim().split(" ");
                int a = Integer.parseInt(numbers[0]);
                int b = Integer.parseInt(numbers[1]);
                System.out.println(Integer.toString(a+b).length());
            }
        } catch (IOException e) {
        }
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int[] top3 = new int[3]; top3 new int[3] 3 String line; line try {
            while((line = br.readLine()) != null){
                String[] numbers = line.trim().split(" ");
                int a = Integer.parseInt(numbers[0]);
                int b = Integer.parseInt(numbers[1]);
                System.out.println(Integer.toString(a+b).length());
            }
        } catch (IOException e) {
        } catch (IOException e) {
        } IOException e {
        } {
            while((line = br.readLine()) != null){
                String[] numbers = line.trim().split(" ");
                int a = Integer.parseInt(numbers[0]);
                int b = Integer.parseInt(numbers[1]);
                System.out.println(Integer.toString(a+b).length());
            }
        } while((line = br.readLine()) != null){
                String[] numbers = line.trim().split(" ");
                int a = Integer.parseInt(numbers[0]);
                int b = Integer.parseInt(numbers[1]);
                System.out.println(Integer.toString(a+b).length());
            } (line = br.readLine()) != null (line = br.readLine()) line br.readLine() br.readLine br null {
                String[] numbers = line.trim().split(" ");
                int a = Integer.parseInt(numbers[0]);
                int b = Integer.parseInt(numbers[1]);
                System.out.println(Integer.toString(a+b).length());
            } String[] numbers = line.trim().split(" "); numbers line.trim().split(" ") line.trim().split line.trim() line.trim line " " int a = Integer.parseInt(numbers[0]); a Integer.parseInt(numbers[0]) Integer.parseInt Integer numbers[0] numbers 0 int b = Integer.parseInt(numbers[1]); b Integer.parseInt(numbers[1]) Integer.parseInt Integer numbers[1] numbers 1 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 String[] args args public class Main {
    public static void main(String[] args) {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int[] top3 = new int[3];
        String line;
        try {
            while((line = br.readLine()) != null){
                String[] numbers = line.trim().split(" ");
                int a = Integer.parseInt(numbers[0]);
                int b = Integer.parseInt(numbers[1]);
                System.out.println(Integer.toString(a+b).length());
            }
        } catch (IOException e) {
        }
    }
} public class Main {
    public static void main(String[] args) {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int[] top3 = new int[3];
        String line;
        try {
            while((line = br.readLine()) != null){
                String[] numbers = line.trim().split(" ");
                int a = Integer.parseInt(numbers[0]);
                int b = Integer.parseInt(numbers[1]);
                System.out.println(Integer.toString(a+b).length());
            }
        } catch (IOException e) {
        }
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int[] top3 = new int[3];
        String line;
        try {
            while((line = br.readLine()) != null){
                String[] numbers = line.trim().split(" ");
                int a = Integer.parseInt(numbers[0]);
                int b = Integer.parseInt(numbers[1]);
                System.out.println(Integer.toString(a+b).length());
            }
        } catch (IOException e) {
        }
    }
}