def sum(data)
  data = data.split(/\s/)
  answer = data[0].to_i + data[1].to_i
  answer = answer.to_s.split(//)
  answer = answer.size
  return answer
end
ans = Array.new
i = 0
loop do
  str = gets
  if str.split(/\s/).size != 2
    break
  else 
    ans[i] = sum(str)
    i = i + 1
  end
end
ans.each do |j|
  puts j
end