while line = gets do
  sum = 0
  a,b = line.split.map(&:to_i)
  sum = a + b
  digit = 0
  while
    digit += 1
    if 10**(digit - 1) < sum && 10**(digit) - 1 > sum
      puts digit
      break
    end
  end
end