import java.util.*;
import static java.util.Arrays.*;
import static java.lang.Math.*;
public class Main {

	static Scanner sc = new Scanner(System.in);
	
	public static void main(String[] args) {
		while (read()) {
			solve();
		}
	}
	
	static int a, b;
	static boolean read() {
		if (!sc.hasNextInt()) return false;
		a = sc.nextInt(); b = sc.nextInt();
		return true;
	}
	
	static void solve() {
		int sum = a + b, res = 0;
		while (sum > 0) {
			sum /= 10;
			res++;
		}
		System.out.println(res);
	}
} import java.util.*; util.* java import static java.util.Arrays.*; import static java.util.Arrays.*; import static java.util.Arrays.*; import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.Math.*; public class Main {

	static Scanner sc = new Scanner(System.in);
	
	public static void main(String[] args) {
		while (read()) {
			solve();
		}
	}
	
	static int a, b;
	static boolean read() {
		if (!sc.hasNextInt()) return false;
		a = sc.nextInt(); b = sc.nextInt();
		return true;
	}
	
	static void solve() {
		int sum = a + b, res = 0;
		while (sum > 0) {
			sum /= 10;
			res++;
		}
		System.out.println(res);
	}
} Main static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) static int a a b; b public static void main(String[] args) {
		while (read()) {
			solve();
		}
	} main {
		while (read()) {
			solve();
		}
	} while (read()) {
			solve();
		} read() read {
			solve();
		} solve() solve String[] args args static boolean read() {
		if (!sc.hasNextInt()) return false;
		a = sc.nextInt(); b = sc.nextInt();
		return true;
	} read {
		if (!sc.hasNextInt()) return false;
		a = sc.nextInt(); b = sc.nextInt();
		return true;
	} if (!sc.hasNextInt()) return false; !sc.hasNextInt() sc.hasNextInt() sc.hasNextInt sc return false; false a = sc.nextInt() a sc.nextInt() sc.nextInt sc b = sc.nextInt() b sc.nextInt() sc.nextInt sc return true; true static void solve() {
		int sum = a + b, res = 0;
		while (sum > 0) {
			sum /= 10;
			res++;
		}
		System.out.println(res);
	} solve {
		int sum = a + b, res = 0;
		while (sum > 0) {
			sum /= 10;
			res++;
		}
		System.out.println(res);
	} int sum = a + b sum a + b a b res = 0; res 0 while (sum > 0) {
			sum /= 10;
			res++;
		} sum > 0 sum 0 {
			sum /= 10;
			res++;
		} sum /= 10 sum 10 res++ res System.out.println(res) System.out.println System.out System System.out res public class Main {

	static Scanner sc = new Scanner(System.in);
	
	public static void main(String[] args) {
		while (read()) {
			solve();
		}
	}
	
	static int a, b;
	static boolean read() {
		if (!sc.hasNextInt()) return false;
		a = sc.nextInt(); b = sc.nextInt();
		return true;
	}
	
	static void solve() {
		int sum = a + b, res = 0;
		while (sum > 0) {
			sum /= 10;
			res++;
		}
		System.out.println(res);
	}
} public class Main {

	static Scanner sc = new Scanner(System.in);
	
	public static void main(String[] args) {
		while (read()) {
			solve();
		}
	}
	
	static int a, b;
	static boolean read() {
		if (!sc.hasNextInt()) return false;
		a = sc.nextInt(); b = sc.nextInt();
		return true;
	}
	
	static void solve() {
		int sum = a + b, res = 0;
		while (sum > 0) {
			sum /= 10;
			res++;
		}
		System.out.println(res);
	}
} Main
import java.util.*;
import static java.util.Arrays.*;
import static java.lang.Math.*;
public class Main {

	static Scanner sc = new Scanner(System.in);
	
	public static void main(String[] args) {
		while (read()) {
			solve();
		}
	}
	
	static int a, b;
	static boolean read() {
		if (!sc.hasNextInt()) return false;
		a = sc.nextInt(); b = sc.nextInt();
		return true;
	}
	
	static void solve() {
		int sum = a + b, res = 0;
		while (sum > 0) {
			sum /= 10;
			res++;
		}
		System.out.println(res);
	}
}