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