include Math
N = gets.to_i
if N % 2 == 1
  puts 0
else
  order = Math.log(N, 5)
  # puts order
  ans = 0
  (1..order).each do |i|
    ans += N.div(5**i)
    #print i.to_s + " "
    #puts ans
  end
  puts ans
end