All Submissions


Problem Statement
You are given a deck of N cards numbered 1 to N. Your goal is to pick up as many cards as possible, with only one requirement: You are not allowed to pick up a card, if it would lead to a situation where you hold three cards with numbers X, Y and Z such that X+Y=Z.

You have to calculate the number of ways in which you can take the maximum number of cards. (The order in which you pick up the cards doesn't matter.)

For example, if N=3, you can't pick up all three cards (because 1+2=3), but you can pick up any two cards. There are 3 ways of selecting two out of three cards (1 and 2, 2 and 3, 3 and 1). Thus the answer for N=3 is 3.

Input Specification
The first line of input contains T, the number of test cases.
Each test case consists of one line containing the number, N.

Ouput Specification
For each test case, ouput a line containing the answer to the particular test case.

Constraint
N fits in 32 bit integer range.

Sample Input

4
1
2
3
4


Sample Output

1
1
3
2


Rohan Laishram


Languages: Brain,C,C++,C#,Java,JavaScript,Pascal,Perl,PHP,Python,Ruby

Time Limit: 1 Second(s)
Score: 100 Point(s)
Input File Limit: 50000 Bytes

Submit

Login to post clarification.

No Clarifications.

Contest

Mode Judge

Passive

Online

Overall Rankings

RankNameScore
1xyz0
2Ams0
3TIP0
4team420
5xyzz0
6asdasdasd0
7abcd0
8khankhan0
9Gabriel0
10gigel0