object Main{
    def main(args: Array[String]): Unit = {
        var n:Long = scala.io.StdIn.readLine.toLong
        var ans:Long = 0
        if(n % 2 != 0){
            println(ans.toString)
        }else{
            n = n / 2
            while(n != 1){
                n = n / 5
                ans += n
            }
            println(ans.toString)
        }
    }
}