program abc148e
    use,intrinsic :: iso_fortran_env
    implicit none
    integer(int64):: n
    integer(int64):: div,ans

    read*, n
    if (n < 10) then
        print'(i0)', 0
        stop
    end if

    if (mod(n,2_8) == 1) then
        print'(i0)', 0 
        stop
    end if
    div=10
    ans=0
    do while (div <= n)
        ans = ans + n/div
        div=div*5
    end do
    print'(i0)', ans
end program abc148e