/**
  * http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0002
  * Digit Number
  */
object Main {
  def main(args: Array[String]): Unit = {
    Iterator.continually(io.StdIn.readLine()).takeWhile(_ != null).map(_.split(" +").map(_.toInt))
      .map { case Array(a, b) => (a + b).toString.length }
      .foreach(println)
  }
}