import java.io.*;
import java.util.*;

class Main{
	public static void main(String[] args) throws IOException{
		BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
		String s = r.readLine();
		StringTokenizer st = new StringTokenizer(s," ");
		int a,b;
		while(true){
			try {
				a = Integer.parseInt(st.nextToken().toString());
				b = Integer.parseInt(st.nextToken().toString());
				a+=b;
				for(b=0;a!=0;a=a/10) {
					b++;
				}
				System.out.println(b);
				s = r.readLine();
				if (s==null) break;
				st = new StringTokenizer(s," ");
			} catch (NoSuchElementException e) {
				System.exit(0);
			}
		}
	}
} import java.io.*; io.* java import java.util.*; util.* java class Main{
	public static void main(String[] args) throws IOException{
		BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
		String s = r.readLine();
		StringTokenizer st = new StringTokenizer(s," ");
		int a,b;
		while(true){
			try {
				a = Integer.parseInt(st.nextToken().toString());
				b = Integer.parseInt(st.nextToken().toString());
				a+=b;
				for(b=0;a!=0;a=a/10) {
					b++;
				}
				System.out.println(b);
				s = r.readLine();
				if (s==null) break;
				st = new StringTokenizer(s," ");
			} catch (NoSuchElementException e) {
				System.exit(0);
			}
		}
	}
} Main public static void main(String[] args) throws IOException{
		BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
		String s = r.readLine();
		StringTokenizer st = new StringTokenizer(s," ");
		int a,b;
		while(true){
			try {
				a = Integer.parseInt(st.nextToken().toString());
				b = Integer.parseInt(st.nextToken().toString());
				a+=b;
				for(b=0;a!=0;a=a/10) {
					b++;
				}
				System.out.println(b);
				s = r.readLine();
				if (s==null) break;
				st = new StringTokenizer(s," ");
			} catch (NoSuchElementException e) {
				System.exit(0);
			}
		}
	} main {
		BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
		String s = r.readLine();
		StringTokenizer st = new StringTokenizer(s," ");
		int a,b;
		while(true){
			try {
				a = Integer.parseInt(st.nextToken().toString());
				b = Integer.parseInt(st.nextToken().toString());
				a+=b;
				for(b=0;a!=0;a=a/10) {
					b++;
				}
				System.out.println(b);
				s = r.readLine();
				if (s==null) break;
				st = new StringTokenizer(s," ");
			} catch (NoSuchElementException e) {
				System.exit(0);
			}
		}
	} BufferedReader r = new BufferedReader(new InputStreamReader(System.in)); r new BufferedReader(new InputStreamReader(System.in)) String s = r.readLine(); s r.readLine() r.readLine r StringTokenizer st = new StringTokenizer(s," "); st new StringTokenizer(s," ") int a a b; b while(true){
			try {
				a = Integer.parseInt(st.nextToken().toString());
				b = Integer.parseInt(st.nextToken().toString());
				a+=b;
				for(b=0;a!=0;a=a/10) {
					b++;
				}
				System.out.println(b);
				s = r.readLine();
				if (s==null) break;
				st = new StringTokenizer(s," ");
			} catch (NoSuchElementException e) {
				System.exit(0);
			}
		} true {
			try {
				a = Integer.parseInt(st.nextToken().toString());
				b = Integer.parseInt(st.nextToken().toString());
				a+=b;
				for(b=0;a!=0;a=a/10) {
					b++;
				}
				System.out.println(b);
				s = r.readLine();
				if (s==null) break;
				st = new StringTokenizer(s," ");
			} catch (NoSuchElementException e) {
				System.exit(0);
			}
		} try {
				a = Integer.parseInt(st.nextToken().toString());
				b = Integer.parseInt(st.nextToken().toString());
				a+=b;
				for(b=0;a!=0;a=a/10) {
					b++;
				}
				System.out.println(b);
				s = r.readLine();
				if (s==null) break;
				st = new StringTokenizer(s," ");
			} catch (NoSuchElementException e) {
				System.exit(0);
			} catch (NoSuchElementException e) {
				System.exit(0);
			} NoSuchElementException e {
				System.exit(0);
			} System.exit(0) System.exit System 0 {
				a = Integer.parseInt(st.nextToken().toString());
				b = Integer.parseInt(st.nextToken().toString());
				a+=b;
				for(b=0;a!=0;a=a/10) {
					b++;
				}
				System.out.println(b);
				s = r.readLine();
				if (s==null) break;
				st = new StringTokenizer(s," ");
			} a = Integer.parseInt(st.nextToken().toString()) a Integer.parseInt(st.nextToken().toString()) Integer.parseInt Integer st.nextToken().toString() st.nextToken().toString st.nextToken() st.nextToken st b = Integer.parseInt(st.nextToken().toString()) b Integer.parseInt(st.nextToken().toString()) Integer.parseInt Integer st.nextToken().toString() st.nextToken().toString st.nextToken() st.nextToken st a+=b a b for(b=0;a!=0;a=a/10) {
					b++;
				} b=0; b=0 b 0 a!=0 a 0 a=a/10 a=a/10 a a/10 a 10 {
					b++;
				} {
					b++;
				} b++ b System.out.println(b) System.out.println System.out System System.out b s = r.readLine() s r.readLine() r.readLine r if (s==null) break; s==null s null break; st = new StringTokenizer(s," ") st new StringTokenizer(s," ") String[] args args
import java.io.*;
import java.util.*;

class Main{
	public static void main(String[] args) throws IOException{
		BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
		String s = r.readLine();
		StringTokenizer st = new StringTokenizer(s," ");
		int a,b;
		while(true){
			try {
				a = Integer.parseInt(st.nextToken().toString());
				b = Integer.parseInt(st.nextToken().toString());
				a+=b;
				for(b=0;a!=0;a=a/10) {
					b++;
				}
				System.out.println(b);
				s = r.readLine();
				if (s==null) break;
				st = new StringTokenizer(s," ");
			} catch (NoSuchElementException e) {
				System.exit(0);
			}
		}
	}
}