import java.util.Scanner;
public class Main {
	public static void main(String[] args) throws java.io.IOException {
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			int a = scan.nextInt();
			int b = scan.nextInt();
			int s = a + b;
			String S = String.valueOf(s);
			if(a == 0 && b == 0){
				System.out.println("0");
			}else{
				System.out.println(S.length());
			}
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) throws java.io.IOException {
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			int a = scan.nextInt();
			int b = scan.nextInt();
			int s = a + b;
			String S = String.valueOf(s);
			if(a == 0 && b == 0){
				System.out.println("0");
			}else{
				System.out.println(S.length());
			}
		}
	}
} Main public static void main(String[] args) throws java.io.IOException {
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			int a = scan.nextInt();
			int b = scan.nextInt();
			int s = a + b;
			String S = String.valueOf(s);
			if(a == 0 && b == 0){
				System.out.println("0");
			}else{
				System.out.println(S.length());
			}
		}
	} main {
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			int a = scan.nextInt();
			int b = scan.nextInt();
			int s = a + b;
			String S = String.valueOf(s);
			if(a == 0 && b == 0){
				System.out.println("0");
			}else{
				System.out.println(S.length());
			}
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) while(scan.hasNext()){
			int a = scan.nextInt();
			int b = scan.nextInt();
			int s = a + b;
			String S = String.valueOf(s);
			if(a == 0 && b == 0){
				System.out.println("0");
			}else{
				System.out.println(S.length());
			}
		} scan.hasNext() scan.hasNext scan {
			int a = scan.nextInt();
			int b = scan.nextInt();
			int s = a + b;
			String S = String.valueOf(s);
			if(a == 0 && b == 0){
				System.out.println("0");
			}else{
				System.out.println(S.length());
			}
		} int a = scan.nextInt(); a scan.nextInt() scan.nextInt scan int b = scan.nextInt(); b scan.nextInt() scan.nextInt scan int s = a + b; s a + b a b String S = String.valueOf(s); S String.valueOf(s) String.valueOf String s if(a == 0 && b == 0){
				System.out.println("0");
			}else{
				System.out.println(S.length());
			} a == 0 && b == 0 a == 0 a 0 b == 0 b 0 {
				System.out.println("0");
			} System.out.println("0") System.out.println System.out System System.out "0" {
				System.out.println(S.length());
			} System.out.println(S.length()) System.out.println System.out System System.out S.length() S.length S String[] args args public class Main {
	public static void main(String[] args) throws java.io.IOException {
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			int a = scan.nextInt();
			int b = scan.nextInt();
			int s = a + b;
			String S = String.valueOf(s);
			if(a == 0 && b == 0){
				System.out.println("0");
			}else{
				System.out.println(S.length());
			}
		}
	}
} public class Main {
	public static void main(String[] args) throws java.io.IOException {
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			int a = scan.nextInt();
			int b = scan.nextInt();
			int s = a + b;
			String S = String.valueOf(s);
			if(a == 0 && b == 0){
				System.out.println("0");
			}else{
				System.out.println(S.length());
			}
		}
	}
} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args) throws java.io.IOException {
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			int a = scan.nextInt();
			int b = scan.nextInt();
			int s = a + b;
			String S = String.valueOf(s);
			if(a == 0 && b == 0){
				System.out.println("0");
			}else{
				System.out.println(S.length());
			}
		}
	}
}