import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Comparator;

import static java.util.Arrays.sort;


public class Main {
    public static void main(String[] args) throws IOException {
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br   = new BufferedReader(isr);
        PrintWriter out     = new PrintWriter(System.out);
        int i = 0;
        String line;
        String[] numList = new String[2];
        try {
            while ((line = br.readLine()) != null) {
                numList = line.split(" ");
                int num0 = Integer.parseInt(numList[0]);
                int num1 = Integer.parseInt(numList[1]);
                int sum = num0 + num1;
                System.out.println((int)Math.log10(sum) + 1);
            }
        } catch (Exception e) {
            System.exit(0);
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.PrintWriter; PrintWriter java.io import java.lang.reflect.Array; Array java.lang.reflect import java.util.ArrayList; ArrayList java.util import java.util.Comparator; Comparator java.util import static java.util.Arrays.sort; import static java.util.Arrays.sort; import static java.util.Arrays.sort; public class Main {
    public static void main(String[] args) throws IOException {
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br   = new BufferedReader(isr);
        PrintWriter out     = new PrintWriter(System.out);
        int i = 0;
        String line;
        String[] numList = new String[2];
        try {
            while ((line = br.readLine()) != null) {
                numList = line.split(" ");
                int num0 = Integer.parseInt(numList[0]);
                int num1 = Integer.parseInt(numList[1]);
                int sum = num0 + num1;
                System.out.println((int)Math.log10(sum) + 1);
            }
        } catch (Exception e) {
            System.exit(0);
        }
    }
} Main public static void main(String[] args) throws IOException {
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br   = new BufferedReader(isr);
        PrintWriter out     = new PrintWriter(System.out);
        int i = 0;
        String line;
        String[] numList = new String[2];
        try {
            while ((line = br.readLine()) != null) {
                numList = line.split(" ");
                int num0 = Integer.parseInt(numList[0]);
                int num1 = Integer.parseInt(numList[1]);
                int sum = num0 + num1;
                System.out.println((int)Math.log10(sum) + 1);
            }
        } catch (Exception e) {
            System.exit(0);
        }
    } main {
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br   = new BufferedReader(isr);
        PrintWriter out     = new PrintWriter(System.out);
        int i = 0;
        String line;
        String[] numList = new String[2];
        try {
            while ((line = br.readLine()) != null) {
                numList = line.split(" ");
                int num0 = Integer.parseInt(numList[0]);
                int num1 = Integer.parseInt(numList[1]);
                int sum = num0 + num1;
                System.out.println((int)Math.log10(sum) + 1);
            }
        } catch (Exception e) {
            System.exit(0);
        }
    } InputStreamReader isr = new InputStreamReader(System.in); isr new InputStreamReader(System.in) BufferedReader br   = new BufferedReader(isr); br new BufferedReader(isr) PrintWriter out     = new PrintWriter(System.out); out new PrintWriter(System.out) int i = 0; i 0 String line; line String[] numList = new String[2]; numList new String[2] 2 try {
            while ((line = br.readLine()) != null) {
                numList = line.split(" ");
                int num0 = Integer.parseInt(numList[0]);
                int num1 = Integer.parseInt(numList[1]);
                int sum = num0 + num1;
                System.out.println((int)Math.log10(sum) + 1);
            }
        } catch (Exception e) {
            System.exit(0);
        } catch (Exception e) {
            System.exit(0);
        } Exception e {
            System.exit(0);
        } System.exit(0) System.exit System 0 {
            while ((line = br.readLine()) != null) {
                numList = line.split(" ");
                int num0 = Integer.parseInt(numList[0]);
                int num1 = Integer.parseInt(numList[1]);
                int sum = num0 + num1;
                System.out.println((int)Math.log10(sum) + 1);
            }
        } while ((line = br.readLine()) != null) {
                numList = line.split(" ");
                int num0 = Integer.parseInt(numList[0]);
                int num1 = Integer.parseInt(numList[1]);
                int sum = num0 + num1;
                System.out.println((int)Math.log10(sum) + 1);
            } (line = br.readLine()) != null (line = br.readLine()) line br.readLine() br.readLine br null {
                numList = line.split(" ");
                int num0 = Integer.parseInt(numList[0]);
                int num1 = Integer.parseInt(numList[1]);
                int sum = num0 + num1;
                System.out.println((int)Math.log10(sum) + 1);
            } numList = line.split(" ") numList line.split(" ") line.split line " " int num0 = Integer.parseInt(numList[0]); num0 Integer.parseInt(numList[0]) Integer.parseInt Integer numList[0] numList 0 int num1 = Integer.parseInt(numList[1]); num1 Integer.parseInt(numList[1]) Integer.parseInt Integer numList[1] numList 1 int sum = num0 + num1; sum num0 + num1 num0 num1 System.out.println((int)Math.log10(sum) + 1) System.out.println System.out System System.out (int)Math.log10(sum) + 1 (int)Math.log10(sum) Math.log10 Math sum 1 String[] args args public class Main {
    public static void main(String[] args) throws IOException {
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br   = new BufferedReader(isr);
        PrintWriter out     = new PrintWriter(System.out);
        int i = 0;
        String line;
        String[] numList = new String[2];
        try {
            while ((line = br.readLine()) != null) {
                numList = line.split(" ");
                int num0 = Integer.parseInt(numList[0]);
                int num1 = Integer.parseInt(numList[1]);
                int sum = num0 + num1;
                System.out.println((int)Math.log10(sum) + 1);
            }
        } catch (Exception e) {
            System.exit(0);
        }
    }
} public class Main {
    public static void main(String[] args) throws IOException {
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br   = new BufferedReader(isr);
        PrintWriter out     = new PrintWriter(System.out);
        int i = 0;
        String line;
        String[] numList = new String[2];
        try {
            while ((line = br.readLine()) != null) {
                numList = line.split(" ");
                int num0 = Integer.parseInt(numList[0]);
                int num1 = Integer.parseInt(numList[1]);
                int sum = num0 + num1;
                System.out.println((int)Math.log10(sum) + 1);
            }
        } catch (Exception e) {
            System.exit(0);
        }
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Comparator;

import static java.util.Arrays.sort;


public class Main {
    public static void main(String[] args) throws IOException {
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br   = new BufferedReader(isr);
        PrintWriter out     = new PrintWriter(System.out);
        int i = 0;
        String line;
        String[] numList = new String[2];
        try {
            while ((line = br.readLine()) != null) {
                numList = line.split(" ");
                int num0 = Integer.parseInt(numList[0]);
                int num1 = Integer.parseInt(numList[1]);
                int sum = num0 + num1;
                System.out.println((int)Math.log10(sum) + 1);
            }
        } catch (Exception e) {
            System.exit(0);
        }
    }
}