N = int(eval(input()))



if N % 2 == 1:

    print((0))

else:

    cnt = 0

    div = 10

    for _ in range(100):

        cnt += N // div

        div *= 5

    print(cnt)



N = int(eval(input()))



if N % 2 == 1:

    print((0))

else:

    ans = 0

    div = 10

    for _ in range(100):

        ans += N // div

        div *= 5



    print(ans)

N = int(eval(input()))
if N % 2 == 1:
    print((0))
else:
    cnt = 0
    div = 10
    for _ in range(100):
        cnt += N // div
        div *= 5
    print(cnt)

N = int(eval(input()))
if N % 2 == 1:
    print((0))
else:
    ans = 0
    div = 10
    for _ in range(100):
        ans += N // div
        div *= 5
    print(ans)

-    cnt = 0 +    ans = 0 -        cnt += N // div +        ans += N // div -    print(cnt) +    print(ans)