#encoding: utf-8                                                                                                                                                                 

def main
  while nums = gets
    a, b = nums.chomp.split(/\s/).collect { |x| x.to_i}
    sum = a + b
    puts dig(sum)
  end
end

def dig num
  res = 0
  while num != 0
    res += 1
    num /= 10   
  end
  res
end

main