sums = []

def digits(v)
  count = 1
  while v >= 10
    v /= 10
    count += 1
  end
  count
end

STDIN.each_line do |line|
  a, b = line.split(" ")
  a, b = a.to_i, b.to_i

  sums << a + b
end

sums.each do |sum|
  puts digits(sum)
end