#include<iostream>using namespace std;
int main(){ int n,q=0,i=0; while(cin>>n) { for( int j=1;j<=n;j++) {i=j; while(i%5==0) { q++; i/=5; }
}cout<<q<<endl;q=0; }
}