#include <bits/stdc++.h>
using namespace std;
int main(void) {
int n;
while (cin >> n) {
int long long sum=1;
for (int i=1;i<=n;i++) {
sum *= i;
}
int sum1=0;
while (sum%5 == 0) {
sum1 += 1;
sum = sum/5;
}
cout << sum1 << endl ;
}
}