import java.util.Scanner

object Main {
  def main(args : Array[String]) = {
    val scanner = new Scanner(System.in)
    var inputs = List.empty[Array[Int]]
    while(scanner.hasNextLine) {
      inputs = scanner.nextLine().split(" ").map(_.toInt) :: inputs
    }

    inputs
      .reverse
      .map(it => (it(0) + it(1)).toString.length)
      .foreach(println(_))

  }
}