#include<iostream>using namespace std;int main(){long long int n,z;while(cin>>n){long long int t=5,sum=0;while(1){z=n/t;if(z==0) break;else {sum=sum+z; t=t*5;}}cout<<sum<<endl;}}