n = gets.to_i

sum = 0

if n % 2 == 0 then
	len = n.to_s().size
	
	(0..1000000).each{ |i|
		base = (5 ** i) * 10
		
#		puts (n / base) * (2 ** i - 1) / (2 ** i)
		
		if n >= base then
			sum += n / base
		else
			break
		end
	}

	puts sum
else
	puts 0
end
