import java.io.InputStreamReader
import java.io.BufferedReader

fun main(args: Array<String>) {
  val br = BufferedReader(InputStreamReader(System.`in`))

  val n = br.readLine().toLong()

  tailrec fun rec(i: Long, cnt: Long, b: Long): Long =
    if(i < 10) cnt
    else rec(i / b, cnt + i / 2L / b, b)

  val ans = if(n % 2L == 1L) 0L else rec(n, 0L, 5L)

  println(ans)
}