fun main(args: Array<String>) {
    abc148e()
}

fun abc148e() {
    val n = readLine()!!.toLong()

    if (n % 2 != 0L) return println(0)

    val answer = (1..50).map { n / 2 / Math.pow(5.0, it.toDouble()).toLong() }.sum()

    println(answer)
}
