# n = 50
# a = b = 1
# c = [1, 1]
# a_ = []
# b_ = []
# # print("#{a} #{b} ")
# (1..n).each do |i|
#     a = (2*i) * a
#     a_ << 2 * i
#     b = (2*i+1) * b
#     b_ << 2*i+1
#     c << a << b
#     # print("#{a} #{b} ")
# end

# p c.size
# p c[-2]
# p a_
# p b_

n = gets.to_i

if n.odd?
    puts 0
    exit
end


k = 1
ans = 0
while (n / k)>0 do
    
    k *= 5
    ans += n / k /2
end

puts ans





