a = []
b = []
i = 0;

while true
   ln = gets
   if ln == nil
      break
   end
   a[i], b[i] = ln.chomp.split
   a[i], b[i] = a[i].to_i, b[i].to_i
   i = i + 1
end

for j in 0..(i - 1)
   cnt = 0
   sum = a[j] + b[j]
   while sum > 0
      cnt = cnt + 1
      sum = sum / 10
   end
   puts cnt
end
