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

public class Main {

	public static void main(String[] args) throws IOException {
		// TODO ?????????????????????????????????????????????
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		while(true){
			String tmpStr = br.readLine();
			if(tmpStr == null){
				break;
			}

			String[] tmpArray = tmpStr.split(" ");
			//int num1;

			int num1 = Integer.parseInt(tmpArray[0]);
			int num2 = Integer.parseInt(tmpArray[1]);

			int sum = num1 + num2;

			int keta = 0;
			for (keta = 0; sum > 0 ; keta++ ){
				sum /= 10;
			}
			System.out.println(keta);
		}


	}

} 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) throws IOException {
		// TODO ?????????????????????????????????????????????
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		while(true){
			String tmpStr = br.readLine();
			if(tmpStr == null){
				break;
			}

			String[] tmpArray = tmpStr.split(" ");
			//int num1;

			int num1 = Integer.parseInt(tmpArray[0]);
			int num2 = Integer.parseInt(tmpArray[1]);

			int sum = num1 + num2;

			int keta = 0;
			for (keta = 0; sum > 0 ; keta++ ){
				sum /= 10;
			}
			System.out.println(keta);
		}


	}

} Main public static void main(String[] args) throws IOException {
		// TODO ?????????????????????????????????????????????
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		while(true){
			String tmpStr = br.readLine();
			if(tmpStr == null){
				break;
			}

			String[] tmpArray = tmpStr.split(" ");
			//int num1;

			int num1 = Integer.parseInt(tmpArray[0]);
			int num2 = Integer.parseInt(tmpArray[1]);

			int sum = num1 + num2;

			int keta = 0;
			for (keta = 0; sum > 0 ; keta++ ){
				sum /= 10;
			}
			System.out.println(keta);
		}


	} main {
		// TODO ?????????????????????????????????????????????
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		while(true){
			String tmpStr = br.readLine();
			if(tmpStr == null){
				break;
			}

			String[] tmpArray = tmpStr.split(" ");
			//int num1;

			int num1 = Integer.parseInt(tmpArray[0]);
			int num2 = Integer.parseInt(tmpArray[1]);

			int sum = num1 + num2;

			int keta = 0;
			for (keta = 0; sum > 0 ; keta++ ){
				sum /= 10;
			}
			System.out.println(keta);
		}


	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) while(true){
			String tmpStr = br.readLine();
			if(tmpStr == null){
				break;
			}

			String[] tmpArray = tmpStr.split(" ");
			//int num1;

			int num1 = Integer.parseInt(tmpArray[0]);
			int num2 = Integer.parseInt(tmpArray[1]);

			int sum = num1 + num2;

			int keta = 0;
			for (keta = 0; sum > 0 ; keta++ ){
				sum /= 10;
			}
			System.out.println(keta);
		} true {
			String tmpStr = br.readLine();
			if(tmpStr == null){
				break;
			}

			String[] tmpArray = tmpStr.split(" ");
			//int num1;

			int num1 = Integer.parseInt(tmpArray[0]);
			int num2 = Integer.parseInt(tmpArray[1]);

			int sum = num1 + num2;

			int keta = 0;
			for (keta = 0; sum > 0 ; keta++ ){
				sum /= 10;
			}
			System.out.println(keta);
		} String tmpStr = br.readLine(); tmpStr br.readLine() br.readLine br if(tmpStr == null){
				break;
			} tmpStr == null tmpStr null {
				break;
			} break; String[] tmpArray = tmpStr.split(" "); tmpArray tmpStr.split(" ") tmpStr.split tmpStr " " int num1 = Integer.parseInt(tmpArray[0]); num1 Integer.parseInt(tmpArray[0]) Integer.parseInt Integer tmpArray[0] tmpArray 0 int num2 = Integer.parseInt(tmpArray[1]); num2 Integer.parseInt(tmpArray[1]) Integer.parseInt Integer tmpArray[1] tmpArray 1 int sum = num1 + num2; sum num1 + num2 num1 num2 int keta = 0; keta 0 for (keta = 0; sum > 0 ; keta++ ){
				sum /= 10;
			} keta = 0; keta = 0 keta 0 sum > 0 sum 0 keta++ keta++ keta {
				sum /= 10;
			} {
				sum /= 10;
			} sum /= 10 sum 10 System.out.println(keta) System.out.println System.out System System.out keta String[] args args public class Main {

	public static void main(String[] args) throws IOException {
		// TODO ?????????????????????????????????????????????
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		while(true){
			String tmpStr = br.readLine();
			if(tmpStr == null){
				break;
			}

			String[] tmpArray = tmpStr.split(" ");
			//int num1;

			int num1 = Integer.parseInt(tmpArray[0]);
			int num2 = Integer.parseInt(tmpArray[1]);

			int sum = num1 + num2;

			int keta = 0;
			for (keta = 0; sum > 0 ; keta++ ){
				sum /= 10;
			}
			System.out.println(keta);
		}


	}

} public class Main {

	public static void main(String[] args) throws IOException {
		// TODO ?????????????????????????????????????????????
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		while(true){
			String tmpStr = br.readLine();
			if(tmpStr == null){
				break;
			}

			String[] tmpArray = tmpStr.split(" ");
			//int num1;

			int num1 = Integer.parseInt(tmpArray[0]);
			int num2 = Integer.parseInt(tmpArray[1]);

			int sum = num1 + num2;

			int keta = 0;
			for (keta = 0; sum > 0 ; keta++ ){
				sum /= 10;
			}
			System.out.println(keta);
		}


	}

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

public class Main {

	public static void main(String[] args) throws IOException {
		// TODO ?????????????????????????????????????????????
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		while(true){
			String tmpStr = br.readLine();
			if(tmpStr == null){
				break;
			}

			String[] tmpArray = tmpStr.split(" ");
			//int num1;

			int num1 = Integer.parseInt(tmpArray[0]);
			int num2 = Integer.parseInt(tmpArray[1]);

			int sum = num1 + num2;

			int keta = 0;
			for (keta = 0; sum > 0 ; keta++ ){
				sum /= 10;
			}
			System.out.println(keta);
		}


	}

}