import scala.io.Source.stdin

object Main {
	def main (args: Array[String]) = {
		var sum = io.StdIn.readLine()
		while(sum != null) {
			stdin.getLines()map(_.split(" ").map(_.toInt).sum.toString.length)
			sum = io.StdIn.readLine()
		}
	}
}