# coding: utf-8
def truss
  puts "1???????????´??°?????\???"
  a = gets.chomp.to_i
  puts "2???????????´??°?????\???"
  b = gets.chomp.to_i
  i = 0
  ab = a + b
  while ab > 0
    ab = ab / 10
    i = i + 1
  end
  return i
end


p truss