import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.io.IOException;
 
public class Main {
  public static void main(String args[] ) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String s="";
    while(s != null) {
      s = br.readLine();
      if (s == null ){break;}
      int a = Integer.parseInt(s.split(" ")[0]);
      int b = Integer.parseInt(s.split(" ")[1]);
      System.out.println(String.valueOf(a + b).length());
    }
  }
} import java.io.InputStreamReader; InputStreamReader java.io import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io public class Main {
  public static void main(String args[] ) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String s="";
    while(s != null) {
      s = br.readLine();
      if (s == null ){break;}
      int a = Integer.parseInt(s.split(" ")[0]);
      int b = Integer.parseInt(s.split(" ")[1]);
      System.out.println(String.valueOf(a + b).length());
    }
  }
} Main public static void main(String args[] ) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String s="";
    while(s != null) {
      s = br.readLine();
      if (s == null ){break;}
      int a = Integer.parseInt(s.split(" ")[0]);
      int b = Integer.parseInt(s.split(" ")[1]);
      System.out.println(String.valueOf(a + b).length());
    }
  } main {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String s="";
    while(s != null) {
      s = br.readLine();
      if (s == null ){break;}
      int a = Integer.parseInt(s.split(" ")[0]);
      int b = Integer.parseInt(s.split(" ")[1]);
      System.out.println(String.valueOf(a + b).length());
    }
  } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String s=""; s "" while(s != null) {
      s = br.readLine();
      if (s == null ){break;}
      int a = Integer.parseInt(s.split(" ")[0]);
      int b = Integer.parseInt(s.split(" ")[1]);
      System.out.println(String.valueOf(a + b).length());
    } s != null s null {
      s = br.readLine();
      if (s == null ){break;}
      int a = Integer.parseInt(s.split(" ")[0]);
      int b = Integer.parseInt(s.split(" ")[1]);
      System.out.println(String.valueOf(a + b).length());
    } s = br.readLine() s br.readLine() br.readLine br if (s == null ){break;} s == null s null {break;} break; int a = Integer.parseInt(s.split(" ")[0]); a Integer.parseInt(s.split(" ")[0]) Integer.parseInt Integer s.split(" ")[0] s.split(" ") s.split s " " 0 int b = Integer.parseInt(s.split(" ")[1]); b Integer.parseInt(s.split(" ")[1]) Integer.parseInt Integer s.split(" ")[1] s.split(" ") s.split s " " 1 System.out.println(String.valueOf(a + b).length()) System.out.println System.out System System.out String.valueOf(a + b).length() String.valueOf(a + b).length String.valueOf(a + b) String.valueOf String a + b a b String args[] args public class Main {
  public static void main(String args[] ) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String s="";
    while(s != null) {
      s = br.readLine();
      if (s == null ){break;}
      int a = Integer.parseInt(s.split(" ")[0]);
      int b = Integer.parseInt(s.split(" ")[1]);
      System.out.println(String.valueOf(a + b).length());
    }
  }
} public class Main {
  public static void main(String args[] ) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String s="";
    while(s != null) {
      s = br.readLine();
      if (s == null ){break;}
      int a = Integer.parseInt(s.split(" ")[0]);
      int b = Integer.parseInt(s.split(" ")[1]);
      System.out.println(String.valueOf(a + b).length());
    }
  }
} Main
import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.io.IOException;
 
public class Main {
  public static void main(String args[] ) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String s="";
    while(s != null) {
      s = br.readLine();
      if (s == null ){break;}
      int a = Integer.parseInt(s.split(" ")[0]);
      int b = Integer.parseInt(s.split(" ")[1]);
      System.out.println(String.valueOf(a + b).length());
    }
  }
}