The minimum number of cubes to cover every visible face on a cuboid measuring is twenty-two.
If we then add a second layer to this solid it would require forty-six cubes to cover every visible face, the third layer would require seventy-eight cubes, and the fourth layer would require one-hundred and eighteen cubes to cover every visible face.
However, the first layer on a cuboid measuring also requires twenty-two cubes; similarly the first layer on cuboids measuring , , and all contain forty-six cubes.
We shall define to represent the number of cuboids that contain cubes in one of its layers. So , , , and .
Given , compute .
The first line of input contains , the number of test cases. Each test case consists of a single line containing a single integer, .
For the first few test files worth 25% of the total points:
For the next few test files worth 25% of the total points:
For the last few test files worth 50% of the total points:
For each test case, output a single line containing a single integer, the value .
The sample I/O are mentioned in the problem statement.