Problem: In a carnival game, there is a huge pyramid of cans with rows, numbered in a regular pattern as shown.
If can is hit initially, then all cans colored red in the picture above would fall.
You throw a ball at the pyramid, and it hits a single can with number . This causes all cans that are stacked on top of this can to fall (that is, can falls, then the cans directly above fall, then the cans directly above those cans, and so on). For example, the picture above shows the cans that would fall if can is hit.
What is the sum of the numbers on all cans that fall? Recall that .
Input Format: The first line contains an integer () — the number of test cases.
The only line of each test case contains a single integer () — it means that the can you hit has label .
Output Format: For each test case, output a single integer — the sum of the numbers on all cans that fall.
Please note, that the answer for some test cases won't fit into 32-bit integer type, so you should use at least 64-bit integer type in your programming language (like long long for C++). For all valid inputs, the answer will always fit into 64-bit integer type.
Note: The first test case is pictured in the statement. The sum of the numbers that fall is
In the second test case, only the can labeled falls, so the answer is .
In the third test case, the cans labeled and fall, so the answer is .
In the fourth test case, the cans labeled and fall, so the answer is .
In the fifth test case, the cans labeled , , and fall, so the answer is .