Limits 1s, 256 MB

Today is a very special day. It’s the birthday of only one girlfriend of programmer Shojib. Now, you all know, he wants to give a special gift to her. He wants to give her a rich ornament. To make the ornament very special he decided to make it as a hexagons shapes where the number of pearls in the ornament will consist of the outlines of regular hexagons with sides up to N pearls, when the hexagons are overlaid so that they share one vertex. The figure of the ornament will quite be like in the following.

The picture correspondent for N = 1 to N = 4 respectively.

Now for the given N, find the number of pearls is needed to make an ornament.

Input

The first line of the input contains a single integer T (1 ≤ T ≤ 20), denoting the number of test cases. Then T test cases follows.

Each test case contains a single integer N (1 ≤ N ≤ 105).

Output

Output a single line for each test case as described.

Sample

InputOutput
3
1
3
10
1
15
190

Submit

Login to submit.

Contributors

Statistics

85% Solution Ratio
deshchow.00Earliest, Jul '19
deshchow.00Fastest, 0.0s
deshchow.00Lightest, 0 B
bokaifShortest, 43B
Toph uses cookies. By continuing you agree to our Cookie Policy.