[<AutoOpen>]
module Program

open System

let read f = stdin.ReadLine() |> f
let reads f = stdin.ReadLine().Split() |> Array.map f

let rec f n =
    if n < 2L then
        1L
    else
        n * f (n - 2L)

[<EntryPoint>]
let main _ =
    let N = read int64

    let fs =
        Seq.scan (fun s _ -> s * 5L) 1L (Seq.initInfinite id)
        |> Seq.tail
        |> Seq.takeWhile (fun x -> x <= N)

    // eprintfn "%A" (Seq.toArray fs)

    if N % 2L = 1L then
        printfn "0"
    else
        let mutable ans = 0L
        for d, i in Seq.zip fs (Seq.initInfinite id |> Seq.tail) do
            let a = N / d
            let b =
                if a % 2L = 0L then
                    a / 2L
                else
                    (a - 1L) / 2L
            let c = b / 5L
            ans <- ans + (int64 i * (b - c))
        printfn "%i" ans

    0