n = gets.chomp.to_i
if n % 2 !=0
  puts 0
elsif n ==0
  puts 0
else
  n1 = n/2
  count_5 = 0
  divisor = 5
  while  n1 > divisor  do
    count_5 += n1/divisor
    divisor = 5*divisor
  end
  puts count_5
end
