N = int(eval(input()))

n = N // 10

lista = []



while n != 0:

    lista.append(n)

    n //= 5

print((sum(lista) if N % 2 == 0 else 0))
N = int(eval(input()))

n = N // 10

cnt = 0



while n != 0:

    cnt += n

    n //= 5

print((cnt if N % 2 == 0 else 0))
N = int(eval(input()))
n = N // 10
lista = []
while n != 0:
    lista.append(n)
    n //= 5
print((sum(lista) if N % 2 == 0 else 0))

N = int(eval(input()))
n = N // 10
cnt = 0
while n != 0:
    cnt += n
    n //= 5
print((cnt if N % 2 == 0 else 0))

-lista = [] +cnt = 0 -    lista.append(n) +    cnt += n -print((sum(lista) if N % 2 == 0 else 0)) +print((cnt if N % 2 == 0 else 0))