#include <bits/stdc++.h>
using namespace std;
const int N = 1e5;
int n;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);cout.tie(0);
cin >> n;
int c5 = 0;
for (int i = 1; i <= n; i ++){
int x = i;
while ( x % 5 == 0 ){
x /= 5;
c5 ++;
}
}
cout << c5;
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CmNvbnN0IGludCBOID0gMWU1OyAKCmludCBuOwoKaW50IG1haW4oKSB7Cglpb3M6OnN5bmNfd2l0aF9zdGRpbygwKTsKCWNpbi50aWUoMCk7Y291dC50aWUoMCk7IAoJCgljaW4gPj4gbjsKCWludCBjNSA9IDA7IAoJZm9yIChpbnQgaSA9IDE7IGkgPD0gbjsgaSArKyl7CgkJaW50IHggPSBpOwoJCQoJCXdoaWxlICggeCAlIDUgPT0gMCApewoJCQkgeCAvPSA1OyAKCQkJIGM1ICsrOyAKCQl9Cgl9CgkKCWNvdXQgPDwgYzU7IAoJCglyZXR1cm4gMDsKfQ==