Tom gives a number N to Roy and ask him to tell the total number of even divisors of the number N. Help Roy to answer the question of Tom.

INPUT:

First line contains the number of testcases T, followed by T lines each containing an integer N. 

OUTPUT:

For each testcase, print the required answer in a singlr line.

Constraints:

1 ≤ T ≤ 100

1 ≤ N ≤ 1000000000

SAMPLE INPUT
2
9
8

SAMPLE OUTPUT
0
3
def div(n):    
    return set(reduce(list.__add__, 
                ([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0)))

for _ in xrange(input()):
	x= div(input())
	print len([1 for i in x if i%2==0])