arr = []

def func( stock )
  cnt = sum = 0
  stock.length.times { |cnt|
    sum += stock[cnt].to_i
  }
  return sum.to_s.length
end

while stock = gets.chomp
  if stock == "EOF"
    break
  end
  arr << func(stock.split)
end

arr.length.times { |cnt|
  puts(arr[cnt])
}