
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main {


	
	public static void main(String[] args) throws NumberFormatException, IOException {
	        BufferedReader br = new BufferedReader(new InputStreamReader(System.in), 1);
	        String str = "";
	        StringTokenizer st;
	        while ((str = br.readLine()) != null) {
	            st = new StringTokenizer(str, " ");
	            if(st.countTokens() > 2)
	            	System.out.println("Only 2 numbers per dataset allowed.");
	            int n1;
				int n2;
				try {
					n1 = Integer.parseInt(st.nextToken());
					n2 = Integer.parseInt(st.nextToken());
		            if(n1<0 || n2 < 0 || n1 > 1000000 || n2 > 1000000)
		            	System.out.println("Out of range. 0 ??? a, b ??? 1,000,000");
		            
		            str = String.valueOf(n1+n2);
		            System.out.println(str.length());
				} catch (NumberFormatException e) {
					System.out.println("Only number as follows allowed: 0 ??? a, b ??? 1,000,000");
				}
	        }
	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.StringTokenizer; StringTokenizer java.util public class Main {


	
	public static void main(String[] args) throws NumberFormatException, IOException {
	        BufferedReader br = new BufferedReader(new InputStreamReader(System.in), 1);
	        String str = "";
	        StringTokenizer st;
	        while ((str = br.readLine()) != null) {
	            st = new StringTokenizer(str, " ");
	            if(st.countTokens() > 2)
	            	System.out.println("Only 2 numbers per dataset allowed.");
	            int n1;
				int n2;
				try {
					n1 = Integer.parseInt(st.nextToken());
					n2 = Integer.parseInt(st.nextToken());
		            if(n1<0 || n2 < 0 || n1 > 1000000 || n2 > 1000000)
		            	System.out.println("Out of range. 0 ??? a, b ??? 1,000,000");
		            
		            str = String.valueOf(n1+n2);
		            System.out.println(str.length());
				} catch (NumberFormatException e) {
					System.out.println("Only number as follows allowed: 0 ??? a, b ??? 1,000,000");
				}
	        }
	}

} Main public static void main(String[] args) throws NumberFormatException, IOException {
	        BufferedReader br = new BufferedReader(new InputStreamReader(System.in), 1);
	        String str = "";
	        StringTokenizer st;
	        while ((str = br.readLine()) != null) {
	            st = new StringTokenizer(str, " ");
	            if(st.countTokens() > 2)
	            	System.out.println("Only 2 numbers per dataset allowed.");
	            int n1;
				int n2;
				try {
					n1 = Integer.parseInt(st.nextToken());
					n2 = Integer.parseInt(st.nextToken());
		            if(n1<0 || n2 < 0 || n1 > 1000000 || n2 > 1000000)
		            	System.out.println("Out of range. 0 ??? a, b ??? 1,000,000");
		            
		            str = String.valueOf(n1+n2);
		            System.out.println(str.length());
				} catch (NumberFormatException e) {
					System.out.println("Only number as follows allowed: 0 ??? a, b ??? 1,000,000");
				}
	        }
	} main {
	        BufferedReader br = new BufferedReader(new InputStreamReader(System.in), 1);
	        String str = "";
	        StringTokenizer st;
	        while ((str = br.readLine()) != null) {
	            st = new StringTokenizer(str, " ");
	            if(st.countTokens() > 2)
	            	System.out.println("Only 2 numbers per dataset allowed.");
	            int n1;
				int n2;
				try {
					n1 = Integer.parseInt(st.nextToken());
					n2 = Integer.parseInt(st.nextToken());
		            if(n1<0 || n2 < 0 || n1 > 1000000 || n2 > 1000000)
		            	System.out.println("Out of range. 0 ??? a, b ??? 1,000,000");
		            
		            str = String.valueOf(n1+n2);
		            System.out.println(str.length());
				} catch (NumberFormatException e) {
					System.out.println("Only number as follows allowed: 0 ??? a, b ??? 1,000,000");
				}
	        }
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in), 1); br new BufferedReader(new InputStreamReader(System.in), 1) String str = ""; str "" StringTokenizer st; st while ((str = br.readLine()) != null) {
	            st = new StringTokenizer(str, " ");
	            if(st.countTokens() > 2)
	            	System.out.println("Only 2 numbers per dataset allowed.");
	            int n1;
				int n2;
				try {
					n1 = Integer.parseInt(st.nextToken());
					n2 = Integer.parseInt(st.nextToken());
		            if(n1<0 || n2 < 0 || n1 > 1000000 || n2 > 1000000)
		            	System.out.println("Out of range. 0 ??? a, b ??? 1,000,000");
		            
		            str = String.valueOf(n1+n2);
		            System.out.println(str.length());
				} catch (NumberFormatException e) {
					System.out.println("Only number as follows allowed: 0 ??? a, b ??? 1,000,000");
				}
	        } (str = br.readLine()) != null (str = br.readLine()) str br.readLine() br.readLine br null {
	            st = new StringTokenizer(str, " ");
	            if(st.countTokens() > 2)
	            	System.out.println("Only 2 numbers per dataset allowed.");
	            int n1;
				int n2;
				try {
					n1 = Integer.parseInt(st.nextToken());
					n2 = Integer.parseInt(st.nextToken());
		            if(n1<0 || n2 < 0 || n1 > 1000000 || n2 > 1000000)
		            	System.out.println("Out of range. 0 ??? a, b ??? 1,000,000");
		            
		            str = String.valueOf(n1+n2);
		            System.out.println(str.length());
				} catch (NumberFormatException e) {
					System.out.println("Only number as follows allowed: 0 ??? a, b ??? 1,000,000");
				}
	        } st = new StringTokenizer(str, " ") st new StringTokenizer(str, " ") if(st.countTokens() > 2)
	            	System.out.println("Only 2 numbers per dataset allowed."); st.countTokens() > 2 st.countTokens() st.countTokens st 2 System.out.println("Only 2 numbers per dataset allowed.") System.out.println System.out System System.out "Only 2 numbers per dataset allowed." int n1; n1 int n2; n2 try {
					n1 = Integer.parseInt(st.nextToken());
					n2 = Integer.parseInt(st.nextToken());
		            if(n1<0 || n2 < 0 || n1 > 1000000 || n2 > 1000000)
		            	System.out.println("Out of range. 0 ??? a, b ??? 1,000,000");
		            
		            str = String.valueOf(n1+n2);
		            System.out.println(str.length());
				} catch (NumberFormatException e) {
					System.out.println("Only number as follows allowed: 0 ??? a, b ??? 1,000,000");
				} catch (NumberFormatException e) {
					System.out.println("Only number as follows allowed: 0 ??? a, b ??? 1,000,000");
				} NumberFormatException e {
					System.out.println("Only number as follows allowed: 0 ??? a, b ??? 1,000,000");
				} System.out.println("Only number as follows allowed: 0 ??? a, b ??? 1,000,000") System.out.println System.out System System.out "Only number as follows allowed: 0 ??? a, b ??? 1,000,000" {
					n1 = Integer.parseInt(st.nextToken());
					n2 = Integer.parseInt(st.nextToken());
		            if(n1<0 || n2 < 0 || n1 > 1000000 || n2 > 1000000)
		            	System.out.println("Out of range. 0 ??? a, b ??? 1,000,000");
		            
		            str = String.valueOf(n1+n2);
		            System.out.println(str.length());
				} n1 = Integer.parseInt(st.nextToken()) n1 Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st n2 = Integer.parseInt(st.nextToken()) n2 Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st if(n1<0 || n2 < 0 || n1 > 1000000 || n2 > 1000000)
		            	System.out.println("Out of range. 0 ??? a, b ??? 1,000,000"); n1<0 || n2 < 0 || n1 > 1000000 || n2 > 1000000 n1 > 1000000 n1<0 || n2 < 0 || n1 > 1000000 || n2 > 1000000 n1<0 n1 0 n2 < 0 n2 0 n1 > 1000000 n1 1000000 n2 > 1000000 n2 1000000 System.out.println("Out of range. 0 ??? a, b ??? 1,000,000") System.out.println System.out System System.out "Out of range. 0 ??? a, b ??? 1,000,000" str = String.valueOf(n1+n2) str String.valueOf(n1+n2) String.valueOf String n1+n2 n1 n2 System.out.println(str.length()) System.out.println System.out System System.out str.length() str.length str String[] args args public class Main {


	
	public static void main(String[] args) throws NumberFormatException, IOException {
	        BufferedReader br = new BufferedReader(new InputStreamReader(System.in), 1);
	        String str = "";
	        StringTokenizer st;
	        while ((str = br.readLine()) != null) {
	            st = new StringTokenizer(str, " ");
	            if(st.countTokens() > 2)
	            	System.out.println("Only 2 numbers per dataset allowed.");
	            int n1;
				int n2;
				try {
					n1 = Integer.parseInt(st.nextToken());
					n2 = Integer.parseInt(st.nextToken());
		            if(n1<0 || n2 < 0 || n1 > 1000000 || n2 > 1000000)
		            	System.out.println("Out of range. 0 ??? a, b ??? 1,000,000");
		            
		            str = String.valueOf(n1+n2);
		            System.out.println(str.length());
				} catch (NumberFormatException e) {
					System.out.println("Only number as follows allowed: 0 ??? a, b ??? 1,000,000");
				}
	        }
	}

} public class Main {


	
	public static void main(String[] args) throws NumberFormatException, IOException {
	        BufferedReader br = new BufferedReader(new InputStreamReader(System.in), 1);
	        String str = "";
	        StringTokenizer st;
	        while ((str = br.readLine()) != null) {
	            st = new StringTokenizer(str, " ");
	            if(st.countTokens() > 2)
	            	System.out.println("Only 2 numbers per dataset allowed.");
	            int n1;
				int n2;
				try {
					n1 = Integer.parseInt(st.nextToken());
					n2 = Integer.parseInt(st.nextToken());
		            if(n1<0 || n2 < 0 || n1 > 1000000 || n2 > 1000000)
		            	System.out.println("Out of range. 0 ??? a, b ??? 1,000,000");
		            
		            str = String.valueOf(n1+n2);
		            System.out.println(str.length());
				} catch (NumberFormatException e) {
					System.out.println("Only number as follows allowed: 0 ??? a, b ??? 1,000,000");
				}
	        }
	}

} Main

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main {


	
	public static void main(String[] args) throws NumberFormatException, IOException {
	        BufferedReader br = new BufferedReader(new InputStreamReader(System.in), 1);
	        String str = "";
	        StringTokenizer st;
	        while ((str = br.readLine()) != null) {
	            st = new StringTokenizer(str, " ");
	            if(st.countTokens() > 2)
	            	System.out.println("Only 2 numbers per dataset allowed.");
	            int n1;
				int n2;
				try {
					n1 = Integer.parseInt(st.nextToken());
					n2 = Integer.parseInt(st.nextToken());
		            if(n1<0 || n2 < 0 || n1 > 1000000 || n2 > 1000000)
		            	System.out.println("Out of range. 0 ??? a, b ??? 1,000,000");
		            
		            str = String.valueOf(n1+n2);
		            System.out.println(str.length());
				} catch (NumberFormatException e) {
					System.out.println("Only number as follows allowed: 0 ??? a, b ??? 1,000,000");
				}
	        }
	}

}