public class Main{
  public void run(java.io.InputStream in,java.io.PrintStream out){
    java.util.Scanner sc = new java.util.Scanner(in);

    int a, b, i, j, dig;
    for(;sc.hasNextInt();){
/*Input*/
      a = sc.nextInt();
      b = sc.nextInt();

/*answer*/
      dig = caldig(a + b);
      System.out.println(dig);
    }
    sc.close();
  }
  public static void main(String[] args){
    (new Main()).run(System.in,System.out);
  }

  private static int caldig(int n){
    int i;
    for(i = 1;i < 10;i++){
      if(n / 10 == 0)return i;
      n = n / 10;
    }
    return 0;
  }
} public class Main{
  public void run(java.io.InputStream in,java.io.PrintStream out){
    java.util.Scanner sc = new java.util.Scanner(in);

    int a, b, i, j, dig;
    for(;sc.hasNextInt();){
/*Input*/
      a = sc.nextInt();
      b = sc.nextInt();

/*answer*/
      dig = caldig(a + b);
      System.out.println(dig);
    }
    sc.close();
  }
  public static void main(String[] args){
    (new Main()).run(System.in,System.out);
  }

  private static int caldig(int n){
    int i;
    for(i = 1;i < 10;i++){
      if(n / 10 == 0)return i;
      n = n / 10;
    }
    return 0;
  }
} Main public void run(java.io.InputStream in,java.io.PrintStream out){
    java.util.Scanner sc = new java.util.Scanner(in);

    int a, b, i, j, dig;
    for(;sc.hasNextInt();){
/*Input*/
      a = sc.nextInt();
      b = sc.nextInt();

/*answer*/
      dig = caldig(a + b);
      System.out.println(dig);
    }
    sc.close();
  } run {
    java.util.Scanner sc = new java.util.Scanner(in);

    int a, b, i, j, dig;
    for(;sc.hasNextInt();){
/*Input*/
      a = sc.nextInt();
      b = sc.nextInt();

/*answer*/
      dig = caldig(a + b);
      System.out.println(dig);
    }
    sc.close();
  } java.util.Scanner sc = new java.util.Scanner(in); sc new java.util.Scanner(in) int a a b b i i j j dig; dig for(;sc.hasNextInt();){
/*Input*/
      a = sc.nextInt();
      b = sc.nextInt();

/*answer*/
      dig = caldig(a + b);
      System.out.println(dig);
    } ; sc.hasNextInt() sc.hasNextInt sc {
/*Input*/
      a = sc.nextInt();
      b = sc.nextInt();

/*answer*/
      dig = caldig(a + b);
      System.out.println(dig);
    } {
/*Input*/
      a = sc.nextInt();
      b = sc.nextInt();

/*answer*/
      dig = caldig(a + b);
      System.out.println(dig);
    } a = sc.nextInt() a sc.nextInt() sc.nextInt sc b = sc.nextInt() b sc.nextInt() sc.nextInt sc dig = caldig(a + b) dig caldig(a + b) caldig a + b a b System.out.println(dig) System.out.println System.out System System.out dig sc.close() sc.close sc java.io.InputStream in in java.io.PrintStream out out public static void main(String[] args){
    (new Main()).run(System.in,System.out);
  } main {
    (new Main()).run(System.in,System.out);
  } (new Main()).run(System.in,System.out) (new Main()).run (new Main()) System.in System System.in System.out System System.out String[] args args private static int caldig(int n){
    int i;
    for(i = 1;i < 10;i++){
      if(n / 10 == 0)return i;
      n = n / 10;
    }
    return 0;
  } caldig {
    int i;
    for(i = 1;i < 10;i++){
      if(n / 10 == 0)return i;
      n = n / 10;
    }
    return 0;
  } int i; i for(i = 1;i < 10;i++){
      if(n / 10 == 0)return i;
      n = n / 10;
    } i = 1; i = 1 i 1 i < 10 i 10 i++ i++ i {
      if(n / 10 == 0)return i;
      n = n / 10;
    } {
      if(n / 10 == 0)return i;
      n = n / 10;
    } if(n / 10 == 0)return i; n / 10 == 0 n / 10 n 10 0 return i; i n = n / 10 n n / 10 n 10 return 0; 0 int n n public class Main{
  public void run(java.io.InputStream in,java.io.PrintStream out){
    java.util.Scanner sc = new java.util.Scanner(in);

    int a, b, i, j, dig;
    for(;sc.hasNextInt();){
/*Input*/
      a = sc.nextInt();
      b = sc.nextInt();

/*answer*/
      dig = caldig(a + b);
      System.out.println(dig);
    }
    sc.close();
  }
  public static void main(String[] args){
    (new Main()).run(System.in,System.out);
  }

  private static int caldig(int n){
    int i;
    for(i = 1;i < 10;i++){
      if(n / 10 == 0)return i;
      n = n / 10;
    }
    return 0;
  }
} public class Main{
  public void run(java.io.InputStream in,java.io.PrintStream out){
    java.util.Scanner sc = new java.util.Scanner(in);

    int a, b, i, j, dig;
    for(;sc.hasNextInt();){
/*Input*/
      a = sc.nextInt();
      b = sc.nextInt();

/*answer*/
      dig = caldig(a + b);
      System.out.println(dig);
    }
    sc.close();
  }
  public static void main(String[] args){
    (new Main()).run(System.in,System.out);
  }

  private static int caldig(int n){
    int i;
    for(i = 1;i < 10;i++){
      if(n / 10 == 0)return i;
      n = n / 10;
    }
    return 0;
  }
} Main
public class Main{
  public void run(java.io.InputStream in,java.io.PrintStream out){
    java.util.Scanner sc = new java.util.Scanner(in);

    int a, b, i, j, dig;
    for(;sc.hasNextInt();){
/*Input*/
      a = sc.nextInt();
      b = sc.nextInt();

/*answer*/
      dig = caldig(a + b);
      System.out.println(dig);
    }
    sc.close();
  }
  public static void main(String[] args){
    (new Main()).run(System.in,System.out);
  }

  private static int caldig(int n){
    int i;
    for(i = 1;i < 10;i++){
      if(n / 10 == 0)return i;
      n = n / 10;
    }
    return 0;
  }
}