import java.util.Scanner
object Main{
    def main(args:Array[String]):Unit = {
        val scan = new Scanner(System.in)
        var list = List[Int]()
        while(scan.hasNextInt()){
            val a = scan.nextInt()
            val b = scan.nextInt()
            list :+= a+b
        }
        for(i <- list){
            println(i.toString.length)
        }
    }
}