spoj#INS14D. Digo Needs Guns

Digo Needs Guns

 

Digo was given the task to secure a very important room where many famous personalities were residing. So the government provided him with some automated guns which he could fit on the line of intersection between any two walls in the room. The guns can rotate anywhere about the point on the line they are placed, but cannot shoot through walls. Since the country was suffering from financial crisis and automated guns were very expensive, Digo thought of using the minimum number of guns and returning the rest. But Digo did not know the configuration of the room as it was very confidential. He just knew the number of sides the room had. The shape of the room can be any simple polygon. What is the minimum number of guns he must carry with him so it is possible for him to secure every possible polygonic room having n walls.


Input:-

The first line consists of a single integer T denoting the number of test cases.
T lines follow each containing an integer N denoting the number of sides.

Output:-

For each test case print the required answer.

Constraints:-

1 <= T <= 1000000

3 <= n <= 1000000000


Sample Input :

1
4

Sample Output :

1

 

Note : This question has large I/O files, faster I/O methods are needed to get an AC.