Problem: Miraya and her best Alice friend are now ending their studies and they are willing to work together in a software company, but before this Alice will be tested by the Miraya through the following procedure,
Miraya is obviously Computer Science person while her best friend belongs to Arts. However, as Miraya didn't want to lose contact with her, she decided to mix Arts and Computer-Science one last time and amaze her friend with Computer-Science, so she could have a geek coding partner.

To amaze her, Miraya selected a natural number N, which she presented to her friend Alice.

Miraya: "So, Alice, as you can see, we have a Natural Number N, yes? The first thing you have to do is ,If you write down the first N natural numbers on a paper you will get a sequence of distinct numbers. You can denote them as 
{x1,x2,x3,…..,xn} a sequence of N distinct integers, which is also a  permutation of first N natural numbers."

Miraya: “Now Alice we have a permutation of first N natural numbers. You can select any permutation of the aforesaid permutation to find out an optimal permutation of numbers. A permutation is said to be optimal if it maximizes the summation of absolute differences of all the consecutive elements of the permutation when written as it is on the paper.”

But Alice is very weak in solving such kind of problems. So she needs your help to get the desired maximum value from the Optimal Permutation. If it becomes possible for Alice then, they will be working together in the same software company. 

Constraints:

1 ≤ T ≤ 10^3

1 ≤ N ≤ (2 x 10^5)

Input:

The first line of the input contains an integer T denoting the number of test cases.
then each test case contains a single integer N.

Output:

For each test case output the required answer in separate line to help Alice.

SAMPLE INPUT
2
2
7

SAMPLE OUTPUT
1
23

Explanation

In Test-case # 1 for n=2 the possible sequences are {1,2} & {2,1} and both yielding the same result i.e. abs(1-2) = 1.

Solution (in PYTHON):

Solution:
def solve (bhavik):
	if (bhavik == 1):
		return 0
	else:
		return (bhavik * bhavik)/2 - 1

t = input()
for _ in xrange(t):
	n = input()
	ans = solve(int(n))
	print ans