#include<iostream>
#include<algorithm>
#include<string>
#include<map>//int dx[4]={0,0,-1,1};int dy[4]={-1,1,0,0};
#include<set>//int gcd(int a,int b){return b?gcd(b,a%b):a;}
#include<vector>
#include<cmath>
#include<queue>
#include<string.h>
#include<stdlib.h>
#include<cstdio>
#define mod 1e9+7
#define ll long long
using namespace std;
int main(){
int n;
cin>>n;
ll p=5,s=0;
for(int i=p;;++i){
s+=n/p;
p*=5;
if(p>n)
break;
}
cout<<s<<endl;
return 0;
}