testCase = Array.new
i = 0
STDIN.each_line do |line|
  testCase[i] = line.split(" ").map(&:to_i)
  i += 1
end
measure = String.new
temp = 0
temp2 = testCase.length/2
temp2.times do |j|
  temp = testCase[j]+testCase[j+1]
  measure=temp.to_s
  puts measure.length
end