object Main {
  case class Line(string: String) {
    def strings: Seq[String] = string.split(' ')
    def ints: Seq[Int] = strings.map(_.toInt)
    def longs: Seq[Long] = strings.map(_.toLong)
    def doubles: Seq[Double] = strings.map(_.toDouble)
    def i(n: Int): Int = ints(n)
    def d(n: Int): Double = doubles(n)
  }

  def readLine: Line = Line(io.StdIn.readLine())
  def readLines(n: Int): Seq[Line] = List.fill(n)(Line(io.StdIn.readLine()))
  def readToEnd(ls: List[Line] = Nil): List[Line] = readLine match {
    case l if l.string == "" => ls
    case l => readToEnd(ls :+ l)
  }

  def yesNo(b: Boolean): String = if (b) "Yes" else "No"

  def main(args: Array[String]): Unit = {
    readToEnd().foreach(l => println((l.i(0) + l.i(1)).toString.length))
  }
}