import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

/**
 * 0002：Digit Number
 * 
 * @author MS14A
 * @version 2015/07/11
 */
public class Main {

    /**
     * 与えられた２つの整数 a と b の和の桁数を出力する。
     * 
     * @param args
     * @throws IOException 
     * @throws NumberFormatException 
     */
    public static void main(String[] args) throws NumberFormatException, IOException {

        List<Integer> a = new ArrayList<Integer>();
        List<Integer> b = new ArrayList<Integer>();

        getTarget(a, b);
        
        for (int i = 0; i < a.size(); ++i) {
            System.out.println(getDigitNumber(a.get(i)+b.get(i)));
        }

    }

    private static int getDigitNumber(int target) {
        return String.valueOf(target).length();
    }

    private static void getTarget(List<Integer> a, List<Integer> b) throws NumberFormatException, IOException {
        // 入力読取り
        InputStreamReader streamReader = new InputStreamReader(System.in);
        BufferedReader bufferedReader = new BufferedReader(streamReader);

        String line = null;

        try {
            while ((line = bufferedReader.readLine()) != null) {
                String[] ab = line.split(" ");
                a.add(Integer.parseInt(ab[0]));
                b.add(Integer.parseInt(ab[1]));
            }

        } finally {
            bufferedReader.close();
            streamReader.close();
        }

    }

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

    /**
     * 与えられた２つの整数 a と b の和の桁数を出力する。
     * 
     * @param args
     * @throws IOException 
     * @throws NumberFormatException 
     */
    public static void main(String[] args) throws NumberFormatException, IOException {

        List<Integer> a = new ArrayList<Integer>();
        List<Integer> b = new ArrayList<Integer>();

        getTarget(a, b);
        
        for (int i = 0; i < a.size(); ++i) {
            System.out.println(getDigitNumber(a.get(i)+b.get(i)));
        }

    }

    private static int getDigitNumber(int target) {
        return String.valueOf(target).length();
    }

    private static void getTarget(List<Integer> a, List<Integer> b) throws NumberFormatException, IOException {
        // 入力読取り
        InputStreamReader streamReader = new InputStreamReader(System.in);
        BufferedReader bufferedReader = new BufferedReader(streamReader);

        String line = null;

        try {
            while ((line = bufferedReader.readLine()) != null) {
                String[] ab = line.split(" ");
                a.add(Integer.parseInt(ab[0]));
                b.add(Integer.parseInt(ab[1]));
            }

        } finally {
            bufferedReader.close();
            streamReader.close();
        }

    }

} Main /**
     * 与えられた２つの整数 a と b の和の桁数を出力する。
     * 
     * @param args
     * @throws IOException 
     * @throws NumberFormatException 
     */
    public static void main(String[] args) throws NumberFormatException, IOException {

        List<Integer> a = new ArrayList<Integer>();
        List<Integer> b = new ArrayList<Integer>();

        getTarget(a, b);
        
        for (int i = 0; i < a.size(); ++i) {
            System.out.println(getDigitNumber(a.get(i)+b.get(i)));
        }

    } main {

        List<Integer> a = new ArrayList<Integer>();
        List<Integer> b = new ArrayList<Integer>();

        getTarget(a, b);
        
        for (int i = 0; i < a.size(); ++i) {
            System.out.println(getDigitNumber(a.get(i)+b.get(i)));
        }

    } List<Integer> a = new ArrayList<Integer>(); a new ArrayList<Integer>() List<Integer> b = new ArrayList<Integer>(); b new ArrayList<Integer>() getTarget(a, b) getTarget a b for (int i = 0; i < a.size(); ++i) {
            System.out.println(getDigitNumber(a.get(i)+b.get(i)));
        } int i = 0; int i = 0; i 0 i < a.size() i a.size() a.size a ++i ++i i {
            System.out.println(getDigitNumber(a.get(i)+b.get(i)));
        } {
            System.out.println(getDigitNumber(a.get(i)+b.get(i)));
        } System.out.println(getDigitNumber(a.get(i)+b.get(i))) System.out.println System.out System System.out getDigitNumber(a.get(i)+b.get(i)) getDigitNumber a.get(i)+b.get(i) a.get(i) a.get a i b.get(i) b.get b i String[] args args private static int getDigitNumber(int target) {
        return String.valueOf(target).length();
    } getDigitNumber {
        return String.valueOf(target).length();
    } return String.valueOf(target).length(); String.valueOf(target).length() String.valueOf(target).length String.valueOf(target) String.valueOf String target int target target private static void getTarget(List<Integer> a, List<Integer> b) throws NumberFormatException, IOException {
        // 入力読取り
        InputStreamReader streamReader = new InputStreamReader(System.in);
        BufferedReader bufferedReader = new BufferedReader(streamReader);

        String line = null;

        try {
            while ((line = bufferedReader.readLine()) != null) {
                String[] ab = line.split(" ");
                a.add(Integer.parseInt(ab[0]));
                b.add(Integer.parseInt(ab[1]));
            }

        } finally {
            bufferedReader.close();
            streamReader.close();
        }

    } getTarget {
        // 入力読取り
        InputStreamReader streamReader = new InputStreamReader(System.in);
        BufferedReader bufferedReader = new BufferedReader(streamReader);

        String line = null;

        try {
            while ((line = bufferedReader.readLine()) != null) {
                String[] ab = line.split(" ");
                a.add(Integer.parseInt(ab[0]));
                b.add(Integer.parseInt(ab[1]));
            }

        } finally {
            bufferedReader.close();
            streamReader.close();
        }

    } InputStreamReader streamReader = new InputStreamReader(System.in); streamReader new InputStreamReader(System.in) BufferedReader bufferedReader = new BufferedReader(streamReader); bufferedReader new BufferedReader(streamReader) String line = null; line null try {
            while ((line = bufferedReader.readLine()) != null) {
                String[] ab = line.split(" ");
                a.add(Integer.parseInt(ab[0]));
                b.add(Integer.parseInt(ab[1]));
            }

        } finally {
            bufferedReader.close();
            streamReader.close();
        } {
            bufferedReader.close();
            streamReader.close();
        } bufferedReader.close() bufferedReader.close bufferedReader streamReader.close() streamReader.close streamReader {
            while ((line = bufferedReader.readLine()) != null) {
                String[] ab = line.split(" ");
                a.add(Integer.parseInt(ab[0]));
                b.add(Integer.parseInt(ab[1]));
            }

        } while ((line = bufferedReader.readLine()) != null) {
                String[] ab = line.split(" ");
                a.add(Integer.parseInt(ab[0]));
                b.add(Integer.parseInt(ab[1]));
            } (line = bufferedReader.readLine()) != null (line = bufferedReader.readLine()) line bufferedReader.readLine() bufferedReader.readLine bufferedReader null {
                String[] ab = line.split(" ");
                a.add(Integer.parseInt(ab[0]));
                b.add(Integer.parseInt(ab[1]));
            } String[] ab = line.split(" "); ab line.split(" ") line.split line " " a.add(Integer.parseInt(ab[0])) a.add a Integer.parseInt(ab[0]) Integer.parseInt Integer ab[0] ab 0 b.add(Integer.parseInt(ab[1])) b.add b Integer.parseInt(ab[1]) Integer.parseInt Integer ab[1] ab 1 List<Integer> a a List<Integer> b b public class Main {

    /**
     * 与えられた２つの整数 a と b の和の桁数を出力する。
     * 
     * @param args
     * @throws IOException 
     * @throws NumberFormatException 
     */
    public static void main(String[] args) throws NumberFormatException, IOException {

        List<Integer> a = new ArrayList<Integer>();
        List<Integer> b = new ArrayList<Integer>();

        getTarget(a, b);
        
        for (int i = 0; i < a.size(); ++i) {
            System.out.println(getDigitNumber(a.get(i)+b.get(i)));
        }

    }

    private static int getDigitNumber(int target) {
        return String.valueOf(target).length();
    }

    private static void getTarget(List<Integer> a, List<Integer> b) throws NumberFormatException, IOException {
        // 入力読取り
        InputStreamReader streamReader = new InputStreamReader(System.in);
        BufferedReader bufferedReader = new BufferedReader(streamReader);

        String line = null;

        try {
            while ((line = bufferedReader.readLine()) != null) {
                String[] ab = line.split(" ");
                a.add(Integer.parseInt(ab[0]));
                b.add(Integer.parseInt(ab[1]));
            }

        } finally {
            bufferedReader.close();
            streamReader.close();
        }

    }

} public class Main {

    /**
     * 与えられた２つの整数 a と b の和の桁数を出力する。
     * 
     * @param args
     * @throws IOException 
     * @throws NumberFormatException 
     */
    public static void main(String[] args) throws NumberFormatException, IOException {

        List<Integer> a = new ArrayList<Integer>();
        List<Integer> b = new ArrayList<Integer>();

        getTarget(a, b);
        
        for (int i = 0; i < a.size(); ++i) {
            System.out.println(getDigitNumber(a.get(i)+b.get(i)));
        }

    }

    private static int getDigitNumber(int target) {
        return String.valueOf(target).length();
    }

    private static void getTarget(List<Integer> a, List<Integer> b) throws NumberFormatException, IOException {
        // 入力読取り
        InputStreamReader streamReader = new InputStreamReader(System.in);
        BufferedReader bufferedReader = new BufferedReader(streamReader);

        String line = null;

        try {
            while ((line = bufferedReader.readLine()) != null) {
                String[] ab = line.split(" ");
                a.add(Integer.parseInt(ab[0]));
                b.add(Integer.parseInt(ab[1]));
            }

        } finally {
            bufferedReader.close();
            streamReader.close();
        }

    }

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

/**
 * 0002：Digit Number
 * 
 * @author MS14A
 * @version 2015/07/11
 */
public class Main {

    /**
     * 与えられた２つの整数 a と b の和の桁数を出力する。
     * 
     * @param args
     * @throws IOException 
     * @throws NumberFormatException 
     */
    public static void main(String[] args) throws NumberFormatException, IOException {

        List<Integer> a = new ArrayList<Integer>();
        List<Integer> b = new ArrayList<Integer>();

        getTarget(a, b);
        
        for (int i = 0; i < a.size(); ++i) {
            System.out.println(getDigitNumber(a.get(i)+b.get(i)));
        }

    }

    private static int getDigitNumber(int target) {
        return String.valueOf(target).length();
    }

    private static void getTarget(List<Integer> a, List<Integer> b) throws NumberFormatException, IOException {
        // 入力読取り
        InputStreamReader streamReader = new InputStreamReader(System.in);
        BufferedReader bufferedReader = new BufferedReader(streamReader);

        String line = null;

        try {
            while ((line = bufferedReader.readLine()) != null) {
                String[] ab = line.split(" ");
                a.add(Integer.parseInt(ab[0]));
                b.add(Integer.parseInt(ab[1]));
            }

        } finally {
            bufferedReader.close();
            streamReader.close();
        }

    }

}