#include <iostream>
using namespace std;
int main() {
long long n, m = 5, s = 0;
cin >> n;
while(n >= m){
s = s + (n / m);
m = m * 5;
}
cout << s;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPiAKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKaW50IG1haW4oKSB7IAogICAgbG9uZyBsb25nIG4sIG0gPSA1LCBzID0gMDsgCiAgICBjaW4gPj4gbjsgCiAgICB3aGlsZShuID49IG0pewogICAgICAgIHMgPSBzICsgKG4gLyBtKTsgCiAgICAgICAgbSA9IG0gKiA1OwogICAgfQogICAgY291dCA8PCBzOwogICAgcmV0dXJuIDA7Cn0=