

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

public class Main{

	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String line;
		while ((line = br.readLine()) != null) {
			String[] arr = line.split(" ");
			int a = Integer.parseInt(arr[0]);
			int b = Integer.parseInt(arr[1]);
			
			System.out.println(f(a + b));
		}
	}
	
	public static int f(int sum) {
		int i = 0;
		while (sum != 0) {
			sum /= 10;
			i++;
		}
		
		return i;
	}

} 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 Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String line;
		while ((line = br.readLine()) != null) {
			String[] arr = line.split(" ");
			int a = Integer.parseInt(arr[0]);
			int b = Integer.parseInt(arr[1]);
			
			System.out.println(f(a + b));
		}
	}
	
	public static int f(int sum) {
		int i = 0;
		while (sum != 0) {
			sum /= 10;
			i++;
		}
		
		return i;
	}

} Main public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String line;
		while ((line = br.readLine()) != null) {
			String[] arr = line.split(" ");
			int a = Integer.parseInt(arr[0]);
			int b = Integer.parseInt(arr[1]);
			
			System.out.println(f(a + b));
		}
	} main {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String line;
		while ((line = br.readLine()) != null) {
			String[] arr = line.split(" ");
			int a = Integer.parseInt(arr[0]);
			int b = Integer.parseInt(arr[1]);
			
			System.out.println(f(a + b));
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String line; line while ((line = br.readLine()) != null) {
			String[] arr = line.split(" ");
			int a = Integer.parseInt(arr[0]);
			int b = Integer.parseInt(arr[1]);
			
			System.out.println(f(a + b));
		} (line = br.readLine()) != null (line = br.readLine()) line br.readLine() br.readLine br null {
			String[] arr = line.split(" ");
			int a = Integer.parseInt(arr[0]);
			int b = Integer.parseInt(arr[1]);
			
			System.out.println(f(a + b));
		} String[] arr = line.split(" "); arr line.split(" ") line.split line " " int a = Integer.parseInt(arr[0]); a Integer.parseInt(arr[0]) Integer.parseInt Integer arr[0] arr 0 int b = Integer.parseInt(arr[1]); b Integer.parseInt(arr[1]) Integer.parseInt Integer arr[1] arr 1 System.out.println(f(a + b)) System.out.println System.out System System.out f(a + b) f a + b a b String[] args args public static int f(int sum) {
		int i = 0;
		while (sum != 0) {
			sum /= 10;
			i++;
		}
		
		return i;
	} f {
		int i = 0;
		while (sum != 0) {
			sum /= 10;
			i++;
		}
		
		return i;
	} int i = 0; i 0 while (sum != 0) {
			sum /= 10;
			i++;
		} sum != 0 sum 0 {
			sum /= 10;
			i++;
		} sum /= 10 sum 10 i++ i return i; i int sum sum public class Main{

	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String line;
		while ((line = br.readLine()) != null) {
			String[] arr = line.split(" ");
			int a = Integer.parseInt(arr[0]);
			int b = Integer.parseInt(arr[1]);
			
			System.out.println(f(a + b));
		}
	}
	
	public static int f(int sum) {
		int i = 0;
		while (sum != 0) {
			sum /= 10;
			i++;
		}
		
		return i;
	}

} public class Main{

	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String line;
		while ((line = br.readLine()) != null) {
			String[] arr = line.split(" ");
			int a = Integer.parseInt(arr[0]);
			int b = Integer.parseInt(arr[1]);
			
			System.out.println(f(a + b));
		}
	}
	
	public static int f(int sum) {
		int i = 0;
		while (sum != 0) {
			sum /= 10;
			i++;
		}
		
		return i;
	}

} 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 Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String line;
		while ((line = br.readLine()) != null) {
			String[] arr = line.split(" ");
			int a = Integer.parseInt(arr[0]);
			int b = Integer.parseInt(arr[1]);
			
			System.out.println(f(a + b));
		}
	}
	
	public static int f(int sum) {
		int i = 0;
		while (sum != 0) {
			sum /= 10;
			i++;
		}
		
		return i;
	}

}