#include <iostream>
#include <cstdio>
#include <vector>
#include <list>
#include <algorithm>
#include <cmath>
#include <stack>
#include <map>
using namespace std;

// thanks for great coding http://judge.u-aizu.ac.jp/onlinejudge/review.jsp?rid=846780

#define REP(i,n) for(int (i)=0; (i)<(n); (i)++)
#define FOR(i,a,b) for(int (i)=(a); (i)<(b); (i)++)
#define PUSH(n,v) for(int i=0; i<(n); i++) {int j; cin >> j; v.push_back(j);}
#define ALL(v) v.begin(), v.end()
#define print(s) cout << (s) << endl

void solve52(int n) {
    int c = 0;
    for(; 0 < n; n /= 5, c += n);
    cout << c << endl;
}

int main() {
    int n;
    while(cin >> n) {
        solve52(n);
    }
    return 0;
}