a = []
b = []
n = 3

for i in 1.. n
  puts i.to_s + "番目のデータを入力"
  a[i] = gets.chomp.to_i
  b[i] = gets.chomp.to_i
end
puts

for i in 1..n
  sum = a[i] + b[i]
  cnt = 1
  while sum >= 10
    sum /= 10
    cnt += 1
  end
  puts cnt
end

