#include<bits/stdc++.h>
using namespace std;
int main()
{
    ifstream cin("lastzero.inp");
    ofstream cout("lastzero.out");
    int64_t n;
    cin>>n;
    int64_t r=0;
    for(int64_t i=1;i<=n;i++)
    {
        int64_t k=i;
        while(k%5==0)
        {
            r++;
            k/=5;
        }
    }
    cout<<r;
}
