#include <bits/stdc++.h>
using namespace std;
#define ll long long
ll n,ans=0,p=5;
int main(){
   cin>>n;
   if(n%2) cout<<ans;
   else
     {
     	while(n/p)
		 {
		 	ans+=n/p/2;
		 	p=p*5;	
		   }  cout<<ans; 
	 }
	
}