#include <cstdio>
using namespace std;
/*(^(^(^(^(^o^)^)^)^)^) &#9602;&#9605;&#9607;&#9608;&#9619;&#9618;&#9617;('ω')&#9617;&#9618;&#9619;&#9608;&#9607;&#9605;&#9602; */
int main(){
	int n,m=0;
	while(scanf("%d",&n)!=EOF){
		while(n!=0){
			n /= 5;
            m+=n;
		}
		printf("%d\n",m);
	}
	return 0;
}