#include <iostream>
using namespace std;

int main ()
{
    int t;
    while (cin >> t) {
        int res = 0;
        while (t) {
            res += t / 5;
            t /= 5;
        }
        cout << res << endl;
    }

    return 0;
}