import java.io.*;
import java.util.List;
import java.util.ArrayList;

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

	public Main(){
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

		List<String> lines = new ArrayList<String>();
		try{
			String line;
			while((line = in.readLine()) != null){
				lines.add(line);
			}
		}catch(IOException err){
			err.printStackTrace();
		}

		for(int i=0; i<lines.size(); i++){
			String[] nums = lines.get(i).split(" ");
			int a = Integer.parseInt(nums[0]);
			int b = Integer.parseInt(nums[1]);
			int num = a + b;

			int digit = 0;
			while(num != 0){
				num = num / 10;
				digit++;
			}

			System.out.println(digit);
		}
	}
} import java.io.*; io.* java import java.util.List; List java.util import java.util.ArrayList; ArrayList java.util public class Main{
	public static void main(String args[]){
		new Main();
	}

	public Main(){
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

		List<String> lines = new ArrayList<String>();
		try{
			String line;
			while((line = in.readLine()) != null){
				lines.add(line);
			}
		}catch(IOException err){
			err.printStackTrace();
		}

		for(int i=0; i<lines.size(); i++){
			String[] nums = lines.get(i).split(" ");
			int a = Integer.parseInt(nums[0]);
			int b = Integer.parseInt(nums[1]);
			int num = a + b;

			int digit = 0;
			while(num != 0){
				num = num / 10;
				digit++;
			}

			System.out.println(digit);
		}
	}
} Main public static void main(String args[]){
		new Main();
	} main {
		new Main();
	} new Main() String args[] args public Main(){
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

		List<String> lines = new ArrayList<String>();
		try{
			String line;
			while((line = in.readLine()) != null){
				lines.add(line);
			}
		}catch(IOException err){
			err.printStackTrace();
		}

		for(int i=0; i<lines.size(); i++){
			String[] nums = lines.get(i).split(" ");
			int a = Integer.parseInt(nums[0]);
			int b = Integer.parseInt(nums[1]);
			int num = a + b;

			int digit = 0;
			while(num != 0){
				num = num / 10;
				digit++;
			}

			System.out.println(digit);
		}
	} Main {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

		List<String> lines = new ArrayList<String>();
		try{
			String line;
			while((line = in.readLine()) != null){
				lines.add(line);
			}
		}catch(IOException err){
			err.printStackTrace();
		}

		for(int i=0; i<lines.size(); i++){
			String[] nums = lines.get(i).split(" ");
			int a = Integer.parseInt(nums[0]);
			int b = Integer.parseInt(nums[1]);
			int num = a + b;

			int digit = 0;
			while(num != 0){
				num = num / 10;
				digit++;
			}

			System.out.println(digit);
		}
	} BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) List<String> lines = new ArrayList<String>(); lines new ArrayList<String>() try{
			String line;
			while((line = in.readLine()) != null){
				lines.add(line);
			}
		}catch(IOException err){
			err.printStackTrace();
		} catch(IOException err){
			err.printStackTrace();
		} IOException err {
			err.printStackTrace();
		} err.printStackTrace() err.printStackTrace err {
			String line;
			while((line = in.readLine()) != null){
				lines.add(line);
			}
		} String line; line while((line = in.readLine()) != null){
				lines.add(line);
			} (line = in.readLine()) != null (line = in.readLine()) line in.readLine() in.readLine in null {
				lines.add(line);
			} lines.add(line) lines.add lines line for(int i=0; i<lines.size(); i++){
			String[] nums = lines.get(i).split(" ");
			int a = Integer.parseInt(nums[0]);
			int b = Integer.parseInt(nums[1]);
			int num = a + b;

			int digit = 0;
			while(num != 0){
				num = num / 10;
				digit++;
			}

			System.out.println(digit);
		} int i=0; int i=0; i 0 i<lines.size() i lines.size() lines.size lines i++ i++ i {
			String[] nums = lines.get(i).split(" ");
			int a = Integer.parseInt(nums[0]);
			int b = Integer.parseInt(nums[1]);
			int num = a + b;

			int digit = 0;
			while(num != 0){
				num = num / 10;
				digit++;
			}

			System.out.println(digit);
		} {
			String[] nums = lines.get(i).split(" ");
			int a = Integer.parseInt(nums[0]);
			int b = Integer.parseInt(nums[1]);
			int num = a + b;

			int digit = 0;
			while(num != 0){
				num = num / 10;
				digit++;
			}

			System.out.println(digit);
		} String[] nums = lines.get(i).split(" "); nums lines.get(i).split(" ") lines.get(i).split lines.get(i) lines.get lines i " " int a = Integer.parseInt(nums[0]); a Integer.parseInt(nums[0]) Integer.parseInt Integer nums[0] nums 0 int b = Integer.parseInt(nums[1]); b Integer.parseInt(nums[1]) Integer.parseInt Integer nums[1] nums 1 int num = a + b; num a + b a b int digit = 0; digit 0 while(num != 0){
				num = num / 10;
				digit++;
			} num != 0 num 0 {
				num = num / 10;
				digit++;
			} num = num / 10 num num / 10 num 10 digit++ digit System.out.println(digit) System.out.println System.out System System.out digit public class Main{
	public static void main(String args[]){
		new Main();
	}

	public Main(){
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

		List<String> lines = new ArrayList<String>();
		try{
			String line;
			while((line = in.readLine()) != null){
				lines.add(line);
			}
		}catch(IOException err){
			err.printStackTrace();
		}

		for(int i=0; i<lines.size(); i++){
			String[] nums = lines.get(i).split(" ");
			int a = Integer.parseInt(nums[0]);
			int b = Integer.parseInt(nums[1]);
			int num = a + b;

			int digit = 0;
			while(num != 0){
				num = num / 10;
				digit++;
			}

			System.out.println(digit);
		}
	}
} public class Main{
	public static void main(String args[]){
		new Main();
	}

	public Main(){
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

		List<String> lines = new ArrayList<String>();
		try{
			String line;
			while((line = in.readLine()) != null){
				lines.add(line);
			}
		}catch(IOException err){
			err.printStackTrace();
		}

		for(int i=0; i<lines.size(); i++){
			String[] nums = lines.get(i).split(" ");
			int a = Integer.parseInt(nums[0]);
			int b = Integer.parseInt(nums[1]);
			int num = a + b;

			int digit = 0;
			while(num != 0){
				num = num / 10;
				digit++;
			}

			System.out.println(digit);
		}
	}
} Main
import java.io.*;
import java.util.List;
import java.util.ArrayList;

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

	public Main(){
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

		List<String> lines = new ArrayList<String>();
		try{
			String line;
			while((line = in.readLine()) != null){
				lines.add(line);
			}
		}catch(IOException err){
			err.printStackTrace();
		}

		for(int i=0; i<lines.size(); i++){
			String[] nums = lines.get(i).split(" ");
			int a = Integer.parseInt(nums[0]);
			int b = Integer.parseInt(nums[1]);
			int num = a + b;

			int digit = 0;
			while(num != 0){
				num = num / 10;
				digit++;
			}

			System.out.println(digit);
		}
	}
}