def fn():
    n = int(input())
    ans = 0
    x = 5

    while(n//x):
        ans += n//x
        x *= 5

    print(ans)

fn()
00d7f968b042fac01e221e0078ed2357c1e245d4
<mask token>

def fn():
    n = int(input())
    ans = 0
    x = 5
    while n // x:
        ans += n // x
        x *= 5
    print(ans)


<mask token>

def fn():
    n = int(input())
    ans = 0
    x = 5
    while n // x:
        ans += n // x
        x *= 5
    print(ans)


fn()

def fn():
    n = int(input())
    ans = 0
    x = 5

    while(n//x):
        ans += n//x
        x *= 5

    print(ans)

fn()