import scala.io.StdIn.readLine;
object Main {
    def main(args: Array[String]): Unit = {
        def go(line: String): Unit = {
            if (line != null) {
                val Array(a, b) = line.split(" ").map(_.toInt);
                val sum = a + b;
                println(sum.toString.length);
                go(readLine);
            }
        }
        go(readLine);
    }
}
