#include "bits/stdc++.h"
using namespace std;

int main() {
	long long  N,ans,k;
	ans = 0;
	cin >> N;
	if ((N % 2) == 0) {
		k = N;
		k = k / 10;
		ans = k;
		while (k> 0) {
			k = k / 5;
			ans += k;
		}
	}
	cout<< ans <<endl;
}
