Laser Mirrors

City of Crackonia has a video-game center called Vice where people can go and play with different game consoles and modern games. As Vice takes care of any kind of gamers, it also keeps a room with classic arcade games (Pacman, Galaga, etc.) also electro-mechanical games such as Pinball. Some days ago Vice acquired a new digital-mechanical game called Laser Mirrors! The game consists of a circle and a dashboard. When player inserts a coin, the machine will generate a random number N, which is the amount of mirrors that will appear on the circle and in one of them there is a hole with a laser (it doesn’t matter at which of the mirrors the laser is in, the result will always be the same). Player’s dashboard has a keyboard on which player can introduce a number X (1 ≤ X < N) and a “Shoot!” button to start the game. Once the player types a number X and press the “Shoot!” button, the laser will be rotated automatically so that laser’s reflex will step each X mirror and this reflex will always get back to the source mirror. If the laser reflex goes through the N mirrors the player can keep playing. Of course the maximum tries the player can have is N − 1 but not all of those tries will be the right ones. For example, if the circle has N = 9 mirrors and player’s choices are X = 2 or X = 3, laser reflex would be like to the next figure: As Laser Mirrors has been having a lot of success among gamers, Vice managers decided to make a promotion in which for each right choice of X, player will receive a coin for another game at Vice. To avoid giving away a lot of coins, a number X can be chosen only once in a game. Bob excited about this new promotion wants to play Laser Mirrors. As he is very strict on hav- ing only perfect games, Bob ask you for some help knowing that you participated on Laser Mirrors programming. You don’t want Bob to cheat so you will not give him the right choices of X he has to do. But as he is a very good friend of you, you will limit to give him a program that computes the maximum amount of coins he can earn for a given number of mirrors N. Input Input consists of a number T (1 ≤ T ≤ 105) which is the number of test cases. Followed by T lines with a integer N (1 ≤ N ≤ 105) which is the number of mirrors.

2/2 Output For each test case print one line with the maximum number of coins that Bob will receive. Sample Input 3 4 6 9 Sample Output 2 2 6