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

public class Main {
	public static void main(String[] a) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		ArrayList<int[]> dataList = new ArrayList<int[]>();
		String str;
		int j=0;
		while ((str = br.readLine()) != null) {
			if(str.length()==0)break;
			String[] strBuf = str.split(" ");
			dataList.add(new int[2]);
			try {
				((int[]) dataList.get(j))[0] = Integer.parseInt(strBuf[0]);
				((int[]) dataList.get(j))[1] = Integer.parseInt(strBuf[1]);
			} catch (NumberFormatException nfex) {
				break;
			}
			j++;
			str = null;
		}

		for (int i = 0; i < dataList.size(); i++) {
			int sum = ((int[]) dataList.get(i))[0]
					+ ((int[]) dataList.get(i))[1];
			System.out.println((int) (Math.log10(sum) + 1));
		}
		br.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 public class Main {
	public static void main(String[] a) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		ArrayList<int[]> dataList = new ArrayList<int[]>();
		String str;
		int j=0;
		while ((str = br.readLine()) != null) {
			if(str.length()==0)break;
			String[] strBuf = str.split(" ");
			dataList.add(new int[2]);
			try {
				((int[]) dataList.get(j))[0] = Integer.parseInt(strBuf[0]);
				((int[]) dataList.get(j))[1] = Integer.parseInt(strBuf[1]);
			} catch (NumberFormatException nfex) {
				break;
			}
			j++;
			str = null;
		}

		for (int i = 0; i < dataList.size(); i++) {
			int sum = ((int[]) dataList.get(i))[0]
					+ ((int[]) dataList.get(i))[1];
			System.out.println((int) (Math.log10(sum) + 1));
		}
		br.close();
	}

} Main public static void main(String[] a) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		ArrayList<int[]> dataList = new ArrayList<int[]>();
		String str;
		int j=0;
		while ((str = br.readLine()) != null) {
			if(str.length()==0)break;
			String[] strBuf = str.split(" ");
			dataList.add(new int[2]);
			try {
				((int[]) dataList.get(j))[0] = Integer.parseInt(strBuf[0]);
				((int[]) dataList.get(j))[1] = Integer.parseInt(strBuf[1]);
			} catch (NumberFormatException nfex) {
				break;
			}
			j++;
			str = null;
		}

		for (int i = 0; i < dataList.size(); i++) {
			int sum = ((int[]) dataList.get(i))[0]
					+ ((int[]) dataList.get(i))[1];
			System.out.println((int) (Math.log10(sum) + 1));
		}
		br.close();
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		ArrayList<int[]> dataList = new ArrayList<int[]>();
		String str;
		int j=0;
		while ((str = br.readLine()) != null) {
			if(str.length()==0)break;
			String[] strBuf = str.split(" ");
			dataList.add(new int[2]);
			try {
				((int[]) dataList.get(j))[0] = Integer.parseInt(strBuf[0]);
				((int[]) dataList.get(j))[1] = Integer.parseInt(strBuf[1]);
			} catch (NumberFormatException nfex) {
				break;
			}
			j++;
			str = null;
		}

		for (int i = 0; i < dataList.size(); i++) {
			int sum = ((int[]) dataList.get(i))[0]
					+ ((int[]) dataList.get(i))[1];
			System.out.println((int) (Math.log10(sum) + 1));
		}
		br.close();
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) ArrayList<int[]> dataList = new ArrayList<int[]>(); dataList new ArrayList<int[]>() String str; str int j=0; j 0 while ((str = br.readLine()) != null) {
			if(str.length()==0)break;
			String[] strBuf = str.split(" ");
			dataList.add(new int[2]);
			try {
				((int[]) dataList.get(j))[0] = Integer.parseInt(strBuf[0]);
				((int[]) dataList.get(j))[1] = Integer.parseInt(strBuf[1]);
			} catch (NumberFormatException nfex) {
				break;
			}
			j++;
			str = null;
		} (str = br.readLine()) != null (str = br.readLine()) str br.readLine() br.readLine br null {
			if(str.length()==0)break;
			String[] strBuf = str.split(" ");
			dataList.add(new int[2]);
			try {
				((int[]) dataList.get(j))[0] = Integer.parseInt(strBuf[0]);
				((int[]) dataList.get(j))[1] = Integer.parseInt(strBuf[1]);
			} catch (NumberFormatException nfex) {
				break;
			}
			j++;
			str = null;
		} if(str.length()==0)break; str.length()==0 str.length() str.length str 0 break; String[] strBuf = str.split(" "); strBuf str.split(" ") str.split str " " dataList.add(new int[2]) dataList.add dataList new int[2] 2 try {
				((int[]) dataList.get(j))[0] = Integer.parseInt(strBuf[0]);
				((int[]) dataList.get(j))[1] = Integer.parseInt(strBuf[1]);
			} catch (NumberFormatException nfex) {
				break;
			} catch (NumberFormatException nfex) {
				break;
			} NumberFormatException nfex {
				break;
			} break; {
				((int[]) dataList.get(j))[0] = Integer.parseInt(strBuf[0]);
				((int[]) dataList.get(j))[1] = Integer.parseInt(strBuf[1]);
			} ((int[]) dataList.get(j))[0] = Integer.parseInt(strBuf[0]) ((int[]) dataList.get(j))[0] ((int[]) dataList.get(j)) dataList.get dataList j 0 Integer.parseInt(strBuf[0]) Integer.parseInt Integer strBuf[0] strBuf 0 ((int[]) dataList.get(j))[1] = Integer.parseInt(strBuf[1]) ((int[]) dataList.get(j))[1] ((int[]) dataList.get(j)) dataList.get dataList j 1 Integer.parseInt(strBuf[1]) Integer.parseInt Integer strBuf[1] strBuf 1 j++ j str = null str null for (int i = 0; i < dataList.size(); i++) {
			int sum = ((int[]) dataList.get(i))[0]
					+ ((int[]) dataList.get(i))[1];
			System.out.println((int) (Math.log10(sum) + 1));
		} int i = 0; int i = 0; i 0 i < dataList.size() i dataList.size() dataList.size dataList i++ i++ i {
			int sum = ((int[]) dataList.get(i))[0]
					+ ((int[]) dataList.get(i))[1];
			System.out.println((int) (Math.log10(sum) + 1));
		} {
			int sum = ((int[]) dataList.get(i))[0]
					+ ((int[]) dataList.get(i))[1];
			System.out.println((int) (Math.log10(sum) + 1));
		} int sum = ((int[]) dataList.get(i))[0]
					+ ((int[]) dataList.get(i))[1]; sum ((int[]) dataList.get(i))[0]
					+ ((int[]) dataList.get(i))[1] ((int[]) dataList.get(i))[0] ((int[]) dataList.get(i)) dataList.get dataList i 0 ((int[]) dataList.get(i))[1] ((int[]) dataList.get(i)) dataList.get dataList i 1 System.out.println((int) (Math.log10(sum) + 1)) System.out.println System.out System System.out (int) (Math.log10(sum) + 1) Math.log10(sum) Math.log10 Math sum 1 br.close() br.close br String[] a a public class Main {
	public static void main(String[] a) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		ArrayList<int[]> dataList = new ArrayList<int[]>();
		String str;
		int j=0;
		while ((str = br.readLine()) != null) {
			if(str.length()==0)break;
			String[] strBuf = str.split(" ");
			dataList.add(new int[2]);
			try {
				((int[]) dataList.get(j))[0] = Integer.parseInt(strBuf[0]);
				((int[]) dataList.get(j))[1] = Integer.parseInt(strBuf[1]);
			} catch (NumberFormatException nfex) {
				break;
			}
			j++;
			str = null;
		}

		for (int i = 0; i < dataList.size(); i++) {
			int sum = ((int[]) dataList.get(i))[0]
					+ ((int[]) dataList.get(i))[1];
			System.out.println((int) (Math.log10(sum) + 1));
		}
		br.close();
	}

} public class Main {
	public static void main(String[] a) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		ArrayList<int[]> dataList = new ArrayList<int[]>();
		String str;
		int j=0;
		while ((str = br.readLine()) != null) {
			if(str.length()==0)break;
			String[] strBuf = str.split(" ");
			dataList.add(new int[2]);
			try {
				((int[]) dataList.get(j))[0] = Integer.parseInt(strBuf[0]);
				((int[]) dataList.get(j))[1] = Integer.parseInt(strBuf[1]);
			} catch (NumberFormatException nfex) {
				break;
			}
			j++;
			str = null;
		}

		for (int i = 0; i < dataList.size(); i++) {
			int sum = ((int[]) dataList.get(i))[0]
					+ ((int[]) dataList.get(i))[1];
			System.out.println((int) (Math.log10(sum) + 1));
		}
		br.close();
	}

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

public class Main {
	public static void main(String[] a) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		ArrayList<int[]> dataList = new ArrayList<int[]>();
		String str;
		int j=0;
		while ((str = br.readLine()) != null) {
			if(str.length()==0)break;
			String[] strBuf = str.split(" ");
			dataList.add(new int[2]);
			try {
				((int[]) dataList.get(j))[0] = Integer.parseInt(strBuf[0]);
				((int[]) dataList.get(j))[1] = Integer.parseInt(strBuf[1]);
			} catch (NumberFormatException nfex) {
				break;
			}
			j++;
			str = null;
		}

		for (int i = 0; i < dataList.size(); i++) {
			int sum = ((int[]) dataList.get(i))[0]
					+ ((int[]) dataList.get(i))[1];
			System.out.println((int) (Math.log10(sum) + 1));
		}
		br.close();
	}

}