import scala.io.Source.stdin

object Main extends App {
  val lines = stdin.getLines()

  val digits = for {
    line       <- lines
    Array(a, b) = line.split(' ').map { _.toInt }
  } yield {
    (a + b).toString.length
  }

  digits.foreach(println)
}

