#include<stdio.h> int main() { long long t,n,k,s; scanf("%lld",&t); for(s=0;s<t;s++) { scanf("%lld",&n); k=0; while(n>0) { k=k+n/5; n=n/5; } printf("%lld ",k); } }