Given N 1×1×1 cubes, arrange them to form a rectangular solid such that the surface area is minimized.
The first line of the input contains an integer T, which is the number of test cases. Each of the next T lines contains an integer N (N ≤ 10000) denoting the number of cubes.
For each case, output a line containing an integer which is the minimized surface area.