import java.util.Scanner;

public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()) {
			String s = sc.nextLine();
			String []n = s.split(" ");
			int a = Integer.parseInt(n[0]);
			int b = Integer.parseInt(n[1]);
			String t = Integer.toString(a + b);
			System.out.println(t.length());
		}
		sc.close();
	}
} import java.util.Scanner; Scanner java.util public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()) {
			String s = sc.nextLine();
			String []n = s.split(" ");
			int a = Integer.parseInt(n[0]);
			int b = Integer.parseInt(n[1]);
			String t = Integer.toString(a + b);
			System.out.println(t.length());
		}
		sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()) {
			String s = sc.nextLine();
			String []n = s.split(" ");
			int a = Integer.parseInt(n[0]);
			int b = Integer.parseInt(n[1]);
			String t = Integer.toString(a + b);
			System.out.println(t.length());
		}
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()) {
			String s = sc.nextLine();
			String []n = s.split(" ");
			int a = Integer.parseInt(n[0]);
			int b = Integer.parseInt(n[1]);
			String t = Integer.toString(a + b);
			System.out.println(t.length());
		}
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while(sc.hasNext()) {
			String s = sc.nextLine();
			String []n = s.split(" ");
			int a = Integer.parseInt(n[0]);
			int b = Integer.parseInt(n[1]);
			String t = Integer.toString(a + b);
			System.out.println(t.length());
		} sc.hasNext() sc.hasNext sc {
			String s = sc.nextLine();
			String []n = s.split(" ");
			int a = Integer.parseInt(n[0]);
			int b = Integer.parseInt(n[1]);
			String t = Integer.toString(a + b);
			System.out.println(t.length());
		} String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc String []n = s.split(" "); n s.split(" ") s.split s " " int a = Integer.parseInt(n[0]); a Integer.parseInt(n[0]) Integer.parseInt Integer n[0] n 0 int b = Integer.parseInt(n[1]); b Integer.parseInt(n[1]) Integer.parseInt Integer n[1] n 1 String t = Integer.toString(a + b); t Integer.toString(a + b) Integer.toString Integer a + b a b System.out.println(t.length()) System.out.println System.out System System.out t.length() t.length t sc.close() sc.close sc String[] args args public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()) {
			String s = sc.nextLine();
			String []n = s.split(" ");
			int a = Integer.parseInt(n[0]);
			int b = Integer.parseInt(n[1]);
			String t = Integer.toString(a + b);
			System.out.println(t.length());
		}
		sc.close();
	}
} public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()) {
			String s = sc.nextLine();
			String []n = s.split(" ");
			int a = Integer.parseInt(n[0]);
			int b = Integer.parseInt(n[1]);
			String t = Integer.toString(a + b);
			System.out.println(t.length());
		}
		sc.close();
	}
} Main
import java.util.Scanner;

public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()) {
			String s = sc.nextLine();
			String []n = s.split(" ");
			int a = Integer.parseInt(n[0]);
			int b = Integer.parseInt(n[1]);
			String t = Integer.toString(a + b);
			System.out.println(t.length());
		}
		sc.close();
	}
}
