object Main extends App {
  var line = scala.io.StdIn.readLine
  while (line != null) {
    val list = line.split(" ").map(_.toInt)
    println((list(0) + list(1)).toString.length)
    line = scala.io.StdIn.readLine
  }
}