Children matches are not toys! - 2
On the table are N matches. They play two, take turns. In one move, the player can take no more than M matches, but not less than one. Climbing the last match wins.
As you already know, with the right game, the chances of winning (in general), the first player a lot more than the second. So Vasya agreed with Masha, Masha, that will always go first, and Vasya will call the maximum number of matches for the collection of M. What is the smallest number N of Masha must choose to secure your winnings no matter how many M to K call Vasya? Under the existing agreement between them, said Masha number should be at least 2 times more than what has been said Vasya.
Input
The first line is the number of T - the number of test cases. In the following lines of T is the number of K - capture allowed to select a maximum of M in one turn.
1 ≤ T ≤ 1000, K ≤ 2·10^9.
Output
For each test case in a single line display the appropriate value of N. It is guaranteed that the number of test cases in a single test does not exceed 1000.