program double_fractorial
    implicit none
    integer(8):: n, md, ans, i,div
    read*, n

    if (mod(n,2) /= 0) then
        print*, 0
        stop
    end if

    div = 10
    ans = 0
    do while(div <= n)
        ans = ans + n/div
        div = div*5
    end do
    print*, ans
end program double_fractorial