def f(x):
	if (x == 0):
		return 1
	if (x == 1):
		return 1
	return x*(x-1)*f(x-2)
 
def z(x):
	t = f(x)
	a = 0
	while((t % 10) == 0):
		t = t / 10
		a = a + 1
	return a
testcases = input()
while testcases > 0:
	n = int(raw_input())
	ans = 0
	i = 5;
	while( i <= n):
		ans += n / i;
		i = i * 5;
	print ans
	testcases -=1