#!/usr/bin/env python3

import sys, math, itertools, collections, bisect

input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')

inf = float('inf') ;mod = 10**9+7

minans = inf ;ans = 0 ;count = 0 ;pro = 1







n=int(eval(input()))

if n%2==1:

    print((0))

    exit()

k=10

for i in range(1,100):

    count+=n//(k)

    k*=5

print(count)
count=0

k=5

n=int(eval(input()))

if n%2==1:

    print((0))

else:

    n//=2

    for i in range(1,100):

        count+=int(n//(k))

        k*=5

    print(count)

#!/usr/bin/env python3
import sys, math, itertools, collections, bisect

input = lambda: sys.stdin.buffer.readline().rstrip().decode("utf-8")
inf = float("inf")
mod = 10**9 + 7
minans = inf
ans = 0
count = 0
pro = 1
n = int(eval(input()))
if n % 2 == 1:
    print((0))
    exit()
k = 10
for i in range(1, 100):
    count += n // (k)
    k *= 5
print(count)

count = 0
k = 5
n = int(eval(input()))
if n % 2 == 1:
    print((0))
else:
    n //= 2
    for i in range(1, 100):
        count += int(n // (k))
        k *= 5
    print(count)

-#!/usr/bin/env python3 -import sys, math, itertools, collections, bisect - -input = lambda: sys.stdin.buffer.readline().rstrip().decode("utf-8") -inf = float("inf") -mod = 10**9 + 7 -minans = inf -ans = 0 -pro = 1 +k = 5 -    exit() -k = 10 -for i in range(1, 100): -    count += n // (k) -    k *= 5 -print(count) +else: +    n //= 2 +    for i in range(1, 100): +        count += int(n // (k)) +        k *= 5 +    print(count)