import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val n = sc.nextLong()

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

    var twoCount = 0L
    var fiveCount = 0L
    var i = 2L
    while (i <= n) {
        twoCount += n / i
        i *= 2L
    }

    i = 10L
    while (i <= n) {
        fiveCount += n / i
        i *= 5L
    }

    println(Math.min(twoCount, fiveCount))
}
