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