object Main {
  def main(args: Array[String]): Unit = {
    val sc = new java.util.Scanner(System.in)
    while (sc.hasNextInt()) {
      val a, b = sc.nextInt()
      println((a + b).toString.size)
    }
  }
}