We want to engrave the names of several distinguished professors on the wall of Amirkabir University. The name of each professor will be written on a tile . We intend to select a rectangle of size on the wall with tiles and inscribe the professors' names on them.
The university will approve this request if the following conditions are met:
Given a natural number , you are asked to calculate the minimum possible perimeter for this tribute.
The first line of input contains a positive integer , representing the number of test cases.
In the next lines, each line contains an integer , representing the number of professors for that test case.
For each of the test cases, print a natural number representing the minimum required perimeter.