Let G(S) denote the sum of the elements of set S and F(n) be the sum of G(s) for all subsets of the set consisting of the first n natural numbers. 

For example, F(3) = (1) + (2) + (3) + (1 + 2) + (1 + 3) + (2 + 3) + (1 + 2 + 3) = 24.



Given n, calculate F(1) + F(2) + ... + F(n).


Input

The first line contains the number of test cases T ( ≤ 1000). Each of the next T lines contains an integer n. (1 ≤ n ≤ 1000000000).

Output

Output T lines, one corresponding to each test case. Since the answers can get very big, output the answer modulo 8388608

Example

Input:
3
1
2
3
Output:
1
7
31
#!/usr/bin/python
MODULUS=8388608

def power(x,n,base):
	result=1
	while(n>0):
		if(n%2):
			result=(result*x)%base;

		x=(x*x)%base;
		n/=2;
	return result



def computeSumDirect(m):
	q1=power(2,m-1,MODULUS)
	q2=(q1*2)%MODULUS
	S1=(m+1)*q1-q2+.5

	#print "q1=",q1,"q2=",q2,"S1=",S1
	A=((m+1)*(m+1)*q1)%MODULUS-.5
	
	q3=(q1*2)%MODULUS
	q4=(q3*2)%MODULUS
	S12=(m+2)*q3-q4+.5
	B=(S12*2)%MODULUS-1
	C=(q1*2)%MODULUS-1

	#	print "A=",A,"B=",B,"C=",C
	S2=A-B+C
	return (int(S1+S2))%MODULUS
	



cases=input()

for i in xrange(cases):
	m=input()
	S=computeSumDirect(m)
	if(S<0):
		print (MODULUS+S)
	else:
		print S