#include <iostream>
#include <math.h>
using namespace std;

int main()
{
	int n = 0,i = 0,count = 0;
	while (cin>>n) {
		i=1;
		count = 0;
		while (n >= int(pow(5,i))) {
			count += n / int(pow(5,i));
			i++;
		}
		cout << count << endl;
	}
	return 0;
}