#include<bits/stdc++.h>
using namespace std;
const int maxn = 2e5+5;
typedef long long ll;

int main(){
	ll n; cin >> n;
	ll sum = 0;
	if(n & 1) cout << sum;
	else{
		n /= 2;
		while(n){
			n /= 5;
			sum += n;
		}
		cout << sum;
	}
}
