KMOVES - Knight Moves

A knight is located at the (black) origin of an infinite chessboard. Let f(n) define the number of black squares the knight can reach after making exactly n moves. Given n (0 <= n <= 108), output f(n).

Input

The first line of the input contains a single integer T, the number of test cases (1 <= T <= 106). Each test case consists of a single positive integer n.

Output

For each value of n in the input, print a single line containing.

Example

Input:
2
0
1

Output:
1
0

Added by:Amlesh Jayakumar
Date:2009-12-16
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64 PERL6
Resource:Own

hide comments
2012-07-13 00:56:29 omar alkattan
dear mostafa 36a2 you've been terminated B)
2012-07-09 02:33:41 Mostafa 36a2
How To Be Faster than 0.07 ???!

Last edit: 2013-01-18 15:24:28
2012-07-06 21:40:30 Alrezza Pradanta BB
Just found out this problem. :)
2012-07-06 17:56:57 marwan akkad
Could anybody explain the output
2012-07-06 04:28:25 Fernando Fonseca [ITA]
This was left unsolved for 2 years, suddenly I solve it and everybody wants to join in the fun? :)
2012-06-26 17:54:04 Mostafa 36a2
Thanks GOD

Last edit: 2012-07-09 02:39:08
2012-06-26 17:51:21 Mostafa 36a2
الحمد لله
أول كود صحيح لي بعد
TEST
الحمد لله
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.