Easy

26.55%

Given a number N. We have to find maximum sum of all permutations of numbers from 1 to N. The maximum sum will be sum of absolute difference of adjacent elements in array.

**Input:**

First line contains an integer T denoting number of test cases. The next T lines contains a single integer N each.

**Output:**

For each test case, print the maximum sum.

**Constraints:**

1<=T<=100000

1<=N<=1000

**Example:**

**Input:**

2

2

3

**Output:**

1

3

**Explanation:**

Input : 2

Output : 1

Permutations of 2 are:

{1, 2} = 1

{2, 1} = 1

```
Input : 3
Output : 3
Permutations of size 3 are:
{1, 2, 3} = 1 + 1
{1, 3, 2} = 2 + 1
{2, 1, 3} = 1 + 2
{2, 3, 1} = 1 + 2
{3, 1, 2} = 2 + 1
{3, 2, 1} = 1 + 1
```