import java.lang.Math

val MOD: Int = 1000000000 + 7
val MODL: Long = MOD.toLong()

fun main(args: Array<String>)
{
    val n = read().toLong()

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

    val ans = f(n / 10L)
    println(ans)
}

fun f(n: Long): Long {
    val q = n / 5L
    if (q == 0L) {
        return n
    }

    return n + f(q)
}

fun read(): String = readLine()!!
