while data = gets
  sum = data.chomp.split(" ").map(&:to_i).inject(&:+)
  digit = 0
  if sum == 0
    puts 1
  else
    until sum == 0
      sum /= 10
      digit += 1
    end
    puts digit
  end
end