
import java.util.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;

public class Main {

	int INF = 1 << 28;

	void run() {
		Scanner sc = new Scanner(System.in);
		for(;sc.hasNext();) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			String str = String.valueOf(a+b);
			System.out.println(str.length());
		}
	}

	public static void main(String[] args) {
		new Main().run();
	}

	void debug(Object... os) {
		System.err.println(Arrays.deepToString(os));
	}
} import java.util.*; util.* java import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.Math.*; import static java.util.Arrays.*; import static java.util.Arrays.*; import static java.util.Arrays.*; public class Main {

	int INF = 1 << 28;

	void run() {
		Scanner sc = new Scanner(System.in);
		for(;sc.hasNext();) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			String str = String.valueOf(a+b);
			System.out.println(str.length());
		}
	}

	public static void main(String[] args) {
		new Main().run();
	}

	void debug(Object... os) {
		System.err.println(Arrays.deepToString(os));
	}
} Main int INF = 1 << 28; INF 1 << 28 1 28 void run() {
		Scanner sc = new Scanner(System.in);
		for(;sc.hasNext();) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			String str = String.valueOf(a+b);
			System.out.println(str.length());
		}
	} run {
		Scanner sc = new Scanner(System.in);
		for(;sc.hasNext();) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			String str = String.valueOf(a+b);
			System.out.println(str.length());
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) for(;sc.hasNext();) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			String str = String.valueOf(a+b);
			System.out.println(str.length());
		} ; sc.hasNext() sc.hasNext sc {
			int a = sc.nextInt();
			int b = sc.nextInt();
			String str = String.valueOf(a+b);
			System.out.println(str.length());
		} {
			int a = sc.nextInt();
			int b = sc.nextInt();
			String str = String.valueOf(a+b);
			System.out.println(str.length());
		} int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc String str = String.valueOf(a+b); str String.valueOf(a+b) String.valueOf String a+b a b System.out.println(str.length()) System.out.println System.out System System.out str.length() str.length str public static void main(String[] args) {
		new Main().run();
	} main {
		new Main().run();
	} new Main().run() new Main().run new Main() String[] args args void debug(Object... os) {
		System.err.println(Arrays.deepToString(os));
	} debug {
		System.err.println(Arrays.deepToString(os));
	} System.err.println(Arrays.deepToString(os)) System.err.println System.err System System.err Arrays.deepToString(os) Arrays.deepToString Arrays os Object... os os public class Main {

	int INF = 1 << 28;

	void run() {
		Scanner sc = new Scanner(System.in);
		for(;sc.hasNext();) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			String str = String.valueOf(a+b);
			System.out.println(str.length());
		}
	}

	public static void main(String[] args) {
		new Main().run();
	}

	void debug(Object... os) {
		System.err.println(Arrays.deepToString(os));
	}
} public class Main {

	int INF = 1 << 28;

	void run() {
		Scanner sc = new Scanner(System.in);
		for(;sc.hasNext();) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			String str = String.valueOf(a+b);
			System.out.println(str.length());
		}
	}

	public static void main(String[] args) {
		new Main().run();
	}

	void debug(Object... os) {
		System.err.println(Arrays.deepToString(os));
	}
} Main

import java.util.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;

public class Main {

	int INF = 1 << 28;

	void run() {
		Scanner sc = new Scanner(System.in);
		for(;sc.hasNext();) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			String str = String.valueOf(a+b);
			System.out.println(str.length());
		}
	}

	public static void main(String[] args) {
		new Main().run();
	}

	void debug(Object... os) {
		System.err.println(Arrays.deepToString(os));
	}
}