import java.io.*;
import java.math.*;
import java.io.*;

class Main
{
	public static void main(String[] arg)throws IOException
	{
		BufferedReader input = new BufferedReader (new InputStreamReader(System.in));

		String line;
		while((line=input.readLine())!=null)
		{
			String[] str=line.split(" ");
			int num[]=new int[3];

			num[0]=Integer.parseInt(str[0]);
			num[1]=Integer.parseInt(str[1]);
			num[2]=num[1]+num[0];

			System.out.println((int)Math.log10(num[2])+1); 
		}
	}
} import java.io.*; io.* java import java.math.*; math.* java import java.io.*; io.* java class Main
{
	public static void main(String[] arg)throws IOException
	{
		BufferedReader input = new BufferedReader (new InputStreamReader(System.in));

		String line;
		while((line=input.readLine())!=null)
		{
			String[] str=line.split(" ");
			int num[]=new int[3];

			num[0]=Integer.parseInt(str[0]);
			num[1]=Integer.parseInt(str[1]);
			num[2]=num[1]+num[0];

			System.out.println((int)Math.log10(num[2])+1); 
		}
	}
} Main public static void main(String[] arg)throws IOException
	{
		BufferedReader input = new BufferedReader (new InputStreamReader(System.in));

		String line;
		while((line=input.readLine())!=null)
		{
			String[] str=line.split(" ");
			int num[]=new int[3];

			num[0]=Integer.parseInt(str[0]);
			num[1]=Integer.parseInt(str[1]);
			num[2]=num[1]+num[0];

			System.out.println((int)Math.log10(num[2])+1); 
		}
	} main {
		BufferedReader input = new BufferedReader (new InputStreamReader(System.in));

		String line;
		while((line=input.readLine())!=null)
		{
			String[] str=line.split(" ");
			int num[]=new int[3];

			num[0]=Integer.parseInt(str[0]);
			num[1]=Integer.parseInt(str[1]);
			num[2]=num[1]+num[0];

			System.out.println((int)Math.log10(num[2])+1); 
		}
	} BufferedReader input = new BufferedReader (new InputStreamReader(System.in)); input new BufferedReader (new InputStreamReader(System.in)) String line; line while((line=input.readLine())!=null)
		{
			String[] str=line.split(" ");
			int num[]=new int[3];

			num[0]=Integer.parseInt(str[0]);
			num[1]=Integer.parseInt(str[1]);
			num[2]=num[1]+num[0];

			System.out.println((int)Math.log10(num[2])+1); 
		} (line=input.readLine())!=null (line=input.readLine()) line input.readLine() input.readLine input null {
			String[] str=line.split(" ");
			int num[]=new int[3];

			num[0]=Integer.parseInt(str[0]);
			num[1]=Integer.parseInt(str[1]);
			num[2]=num[1]+num[0];

			System.out.println((int)Math.log10(num[2])+1); 
		} String[] str=line.split(" "); str line.split(" ") line.split line " " int num[]=new int[3]; num new int[3] 3 num[0]=Integer.parseInt(str[0]) num[0] num 0 Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 num[1]=Integer.parseInt(str[1]) num[1] num 1 Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 num[2]=num[1]+num[0] num[2] num 2 num[1]+num[0] num[1] num 1 num[0] num 0 System.out.println((int)Math.log10(num[2])+1) System.out.println System.out System System.out (int)Math.log10(num[2])+1 (int)Math.log10(num[2]) Math.log10 Math num[2] num 2 1 String[] arg arg
import java.io.*;
import java.math.*;
import java.io.*;

class Main
{
	public static void main(String[] arg)throws IOException
	{
		BufferedReader input = new BufferedReader (new InputStreamReader(System.in));

		String line;
		while((line=input.readLine())!=null)
		{
			String[] str=line.split(" ");
			int num[]=new int[3];

			num[0]=Integer.parseInt(str[0]);
			num[1]=Integer.parseInt(str[1]);
			num[2]=num[1]+num[0];

			System.out.println((int)Math.log10(num[2])+1); 
		}
	}
}