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
  count_2 = 0
  divisor2 = 2
  while n1 >= divisor2 do
    count_2 += n1/divisor
    divisor2 = 2*divisor
  end
   count_2 += n/2
  if count_5 < count_2
  puts count_5
  else
  puts count_2
  end
end