import scala.io.Source

object aizu_v0_0002 {
  def main(args: Array[String]) = {
    val source = Source.fromFile(args(0))
    for (l <- source.getLines)
      println ((l split " ").map(e => e.toInt).reduceLeft(_ + _).toString.length)
  }
}