object Main extends App {
	val sc = new java.util.Scanner(System.in)
	val n  = sc.nextLong
	
	def g(n: Long, acc: Long): Long = if (n < 2) acc else g(n / 5, acc + n / 5)
	
	println(if (n % 2 != 0) 0 else g(n / 2, 0))
}