
object Main {
  def main(args: Array[String]): Unit = {
    val in = new java.util.Scanner(System.in)
    print(getResult(in))
  }
  def getResult(in:java.util.Scanner):String = {
    if(!in.hasNext()){return ""}
    val a = in.nextInt()
    val b = in.nextInt()
    val v = a+b
    println(getDigit(v))
    return getResult(in)
    //    return getDigit(v) + "\n" + getResult(in)
    
  }
  def getDigit(v:Int):Int = {
    if(v/10== 0){
      return 1
    }
    return getDigit(v/10)+1
    
  }
}