def count(sum)
  rsl = 0
  while sum != 0
    rsl = rsl + 1
    sum = sum/10
  end
  return rsl
end

ltd = 1000000

while n = gets
  #print '(a,b) >>> '
  a,b = n.chomp.split
  a = a.to_i
  b = b.to_i
  puts count(a+b)
  if a < 0 || b < 0 || a > ltd || b > ltd || a = nil || b = nil
    break
  end
end

