n = gets.chomp.to_i

if n % 2 == 1 || n < 10
  puts 0
else
  count = 1
  result = 0
  while n / (5 ** count) > 0 do
    tmp = n / ((5 ** count) * 2)
    break if tmp < 1
    result +=  tmp
    count += 1
  end
end
puts result