import java.io.*;
import java.util.*;
public class Main{
 public static void main(String args[]){
  BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
  try{
   String str=null;
   while((str=br.readLine())!=null){
    StringTokenizer st=new StringTokenizer(str);
    int i=Integer.parseInt(st.nextToken());
    int j=Integer.parseInt(st.nextToken());
    System.out.println(String.valueOf(i+j).length());
   }
   br.close();
  }catch(Exception ex){
  System.exit(0);
  }
 }
} import java.io.*; io.* java import java.util.*; util.* java public class Main{
 public static void main(String args[]){
  BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
  try{
   String str=null;
   while((str=br.readLine())!=null){
    StringTokenizer st=new StringTokenizer(str);
    int i=Integer.parseInt(st.nextToken());
    int j=Integer.parseInt(st.nextToken());
    System.out.println(String.valueOf(i+j).length());
   }
   br.close();
  }catch(Exception ex){
  System.exit(0);
  }
 }
} Main public static void main(String args[]){
  BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
  try{
   String str=null;
   while((str=br.readLine())!=null){
    StringTokenizer st=new StringTokenizer(str);
    int i=Integer.parseInt(st.nextToken());
    int j=Integer.parseInt(st.nextToken());
    System.out.println(String.valueOf(i+j).length());
   }
   br.close();
  }catch(Exception ex){
  System.exit(0);
  }
 } main {
  BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
  try{
   String str=null;
   while((str=br.readLine())!=null){
    StringTokenizer st=new StringTokenizer(str);
    int i=Integer.parseInt(st.nextToken());
    int j=Integer.parseInt(st.nextToken());
    System.out.println(String.valueOf(i+j).length());
   }
   br.close();
  }catch(Exception ex){
  System.exit(0);
  }
 } BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) try{
   String str=null;
   while((str=br.readLine())!=null){
    StringTokenizer st=new StringTokenizer(str);
    int i=Integer.parseInt(st.nextToken());
    int j=Integer.parseInt(st.nextToken());
    System.out.println(String.valueOf(i+j).length());
   }
   br.close();
  }catch(Exception ex){
  System.exit(0);
  } catch(Exception ex){
  System.exit(0);
  } Exception ex {
  System.exit(0);
  } System.exit(0) System.exit System 0 {
   String str=null;
   while((str=br.readLine())!=null){
    StringTokenizer st=new StringTokenizer(str);
    int i=Integer.parseInt(st.nextToken());
    int j=Integer.parseInt(st.nextToken());
    System.out.println(String.valueOf(i+j).length());
   }
   br.close();
  } String str=null; str null while((str=br.readLine())!=null){
    StringTokenizer st=new StringTokenizer(str);
    int i=Integer.parseInt(st.nextToken());
    int j=Integer.parseInt(st.nextToken());
    System.out.println(String.valueOf(i+j).length());
   } (str=br.readLine())!=null (str=br.readLine()) str br.readLine() br.readLine br null {
    StringTokenizer st=new StringTokenizer(str);
    int i=Integer.parseInt(st.nextToken());
    int j=Integer.parseInt(st.nextToken());
    System.out.println(String.valueOf(i+j).length());
   } StringTokenizer st=new StringTokenizer(str); st new StringTokenizer(str) int i=Integer.parseInt(st.nextToken()); i Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st int j=Integer.parseInt(st.nextToken()); j Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st System.out.println(String.valueOf(i+j).length()) System.out.println System.out System System.out String.valueOf(i+j).length() String.valueOf(i+j).length String.valueOf(i+j) String.valueOf String i+j i j br.close() br.close br String args[] args public class Main{
 public static void main(String args[]){
  BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
  try{
   String str=null;
   while((str=br.readLine())!=null){
    StringTokenizer st=new StringTokenizer(str);
    int i=Integer.parseInt(st.nextToken());
    int j=Integer.parseInt(st.nextToken());
    System.out.println(String.valueOf(i+j).length());
   }
   br.close();
  }catch(Exception ex){
  System.exit(0);
  }
 }
} public class Main{
 public static void main(String args[]){
  BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
  try{
   String str=null;
   while((str=br.readLine())!=null){
    StringTokenizer st=new StringTokenizer(str);
    int i=Integer.parseInt(st.nextToken());
    int j=Integer.parseInt(st.nextToken());
    System.out.println(String.valueOf(i+j).length());
   }
   br.close();
  }catch(Exception ex){
  System.exit(0);
  }
 }
} Main
import java.io.*;
import java.util.*;
public class Main{
 public static void main(String args[]){
  BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
  try{
   String str=null;
   while((str=br.readLine())!=null){
    StringTokenizer st=new StringTokenizer(str);
    int i=Integer.parseInt(st.nextToken());
    int j=Integer.parseInt(st.nextToken());
    System.out.println(String.valueOf(i+j).length());
   }
   br.close();
  }catch(Exception ex){
  System.exit(0);
  }
 }
}