fun main(args: Array<String>) {
    val N = readLine()!!.toLong()

    if (N % 2 == 1L) {
        println(0)
        return
    }

    if (N == 0L) {
        println(0)
        return
    }

    val a = func(N, 2L)
    val b = func2(N, 5L)

    println(Math.min(a, b))
}

private fun func(N: Long, p: Long): Long {
    var res = 0L
    var a = p

    while (a <= N) {
        res += N / a
        a *= p
    }
    return res
}

private fun func2(N: Long, p: Long): Long {
    var res = 0L
    var a = p * 2L

    while (a <= N) {
        res += N / a
        a *= p
    }
    return res
}
