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

class Main {
	public static void main(String[] args) throws NumberFormatException, IOException {
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		String line = null;
		List<Integer> results = new ArrayList<Integer>();
		
		while ((line = br.readLine()) != null) {
			StringTokenizer st = new StringTokenizer(line);
			if (!st.hasMoreTokens()) break;
			
			int a = Integer.parseInt(st.nextToken());
			int b = Integer.parseInt(st.nextToken());
			
			results.add(Integer.toString(a + b).length());
		}
		
		for (int x : results) {
			System.out.println(x);
		}
	}
} 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 import java.util.Scanner; Scanner java.util import java.util.StringTokenizer; StringTokenizer java.util class Main {
	public static void main(String[] args) throws NumberFormatException, IOException {
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		String line = null;
		List<Integer> results = new ArrayList<Integer>();
		
		while ((line = br.readLine()) != null) {
			StringTokenizer st = new StringTokenizer(line);
			if (!st.hasMoreTokens()) break;
			
			int a = Integer.parseInt(st.nextToken());
			int b = Integer.parseInt(st.nextToken());
			
			results.add(Integer.toString(a + b).length());
		}
		
		for (int x : results) {
			System.out.println(x);
		}
	}
} Main public static void main(String[] args) throws NumberFormatException, IOException {
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		String line = null;
		List<Integer> results = new ArrayList<Integer>();
		
		while ((line = br.readLine()) != null) {
			StringTokenizer st = new StringTokenizer(line);
			if (!st.hasMoreTokens()) break;
			
			int a = Integer.parseInt(st.nextToken());
			int b = Integer.parseInt(st.nextToken());
			
			results.add(Integer.toString(a + b).length());
		}
		
		for (int x : results) {
			System.out.println(x);
		}
	} main {
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		String line = null;
		List<Integer> results = new ArrayList<Integer>();
		
		while ((line = br.readLine()) != null) {
			StringTokenizer st = new StringTokenizer(line);
			if (!st.hasMoreTokens()) break;
			
			int a = Integer.parseInt(st.nextToken());
			int b = Integer.parseInt(st.nextToken());
			
			results.add(Integer.toString(a + b).length());
		}
		
		for (int x : results) {
			System.out.println(x);
		}
	} InputStreamReader isr = new InputStreamReader(System.in); isr new InputStreamReader(System.in) BufferedReader br = new BufferedReader(isr); br new BufferedReader(isr) String line = null; line null List<Integer> results = new ArrayList<Integer>(); results new ArrayList<Integer>() while ((line = br.readLine()) != null) {
			StringTokenizer st = new StringTokenizer(line);
			if (!st.hasMoreTokens()) break;
			
			int a = Integer.parseInt(st.nextToken());
			int b = Integer.parseInt(st.nextToken());
			
			results.add(Integer.toString(a + b).length());
		} (line = br.readLine()) != null (line = br.readLine()) line br.readLine() br.readLine br null {
			StringTokenizer st = new StringTokenizer(line);
			if (!st.hasMoreTokens()) break;
			
			int a = Integer.parseInt(st.nextToken());
			int b = Integer.parseInt(st.nextToken());
			
			results.add(Integer.toString(a + b).length());
		} StringTokenizer st = new StringTokenizer(line); st new StringTokenizer(line) if (!st.hasMoreTokens()) break; !st.hasMoreTokens() st.hasMoreTokens() st.hasMoreTokens st break; int a = Integer.parseInt(st.nextToken()); a Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st int b = Integer.parseInt(st.nextToken()); b Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st results.add(Integer.toString(a + b).length()) results.add results Integer.toString(a + b).length() Integer.toString(a + b).length Integer.toString(a + b) Integer.toString Integer a + b a b for (int x : results) {
			System.out.println(x);
		} int x results {
			System.out.println(x);
		} {
			System.out.println(x);
		} System.out.println(x) System.out.println System.out System System.out x String[] args args
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import java.util.StringTokenizer;

class Main {
	public static void main(String[] args) throws NumberFormatException, IOException {
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		String line = null;
		List<Integer> results = new ArrayList<Integer>();
		
		while ((line = br.readLine()) != null) {
			StringTokenizer st = new StringTokenizer(line);
			if (!st.hasMoreTokens()) break;
			
			int a = Integer.parseInt(st.nextToken());
			int b = Integer.parseInt(st.nextToken());
			
			results.add(Integer.toString(a + b).length());
		}
		
		for (int x : results) {
			System.out.println(x);
		}
	}
}