Two players are engaged in the game Split the Pile. Initially, there is a pile consisting of candies. A player can split any pile into two smaller piles, provided the sizes of these two piles are different. The player who cannot make a move loses the game. Determine the number of ways the first player can make an initial move and still win, assuming both players play optimally.
The first line contains the number of games (1 \leq t \leq 10^4). Each of the following lines describes a game with a single integer (1 \leq n \leq 10^4), representing the number of candies in the initial pile.
For each game, output the number of ways the first player can make the first move and still win, assuming both players play optimally. If the first player is destined to lose, output 0.
Example 1