$fact = [1]

def factorial(n)
	while $fact.size < n
		$fact << $fact[-1] * ($fact.size+1)
	end
	return $fact[n-1]
end

def count_zero(n)
	count = 0
	s = n.to_s
	while s[-1] == "0"
		count += 1
		s.slice!(-1,1)
	end
	count
end

while n = gets.to_i
	puts count_zero(factorial(n)) 
end