Edrisov likes to keep his house clean, but knowing that the exams are around the corner, he doesn't have a lot of free time, so he decided it's time to buy a robovac!
Robovac is a short name for robot vaccum cleaner, which -given it's name- does the cleaning automatically.
Edrisov lives inside a line divided into $$$N$$$ cells. Initially the robot is standing on the middle cell (cell with index $$$\lceil \frac {N}{2} \rceil$$$) and faces the right direction (direction of the $$$N_{th}$$$ cell), the robot will keep moving in some direction until it steps on a cell it hasn't visited yet, then it will change direction and repeat the process.
The robot will stop moving when all cells are visited. (see notes for a better understanding on how the robot is moving).
Can you help Edrisov to know how many steps the robot will make during the cleaning process?
Each test contains multiple test cases. The first line contains the number of test cases $$$T$$$ ($$$1 \le T \le 10^5$$$). Description of the test cases follows.
Each of the following $$$T$$$ lines, contains a single integer $$$N$$$ ($$$1\le{N}\le{10}^9$$$) — Number of cells in the line.
For each test case, output a single integer denoting the answer for the $$$i_{th}$$$ test case.
2 3 4
3 6
for $$$N=4$$$, the robot starts at cell with index $$$2$$$ and faces the right direction:
Name |
---|