object Main{
  def main(args: Array[String]) {
    val sc = new java.util.Scanner(System.in)
    while(sc.hasNext){
      println((sc.nextInt() + sc.nextInt()).toString().length().toString())
    }
  }
}