CMIYC  Catch Me If You Can
One day two friends rocko and hunter go to playground which in shape of regular connected polygon. They were confused about which game to play, suddenly rocko comes with an idea of playing Catch me if you can. In this game what they are supposed to do is to start from a check post in the ground and then simultaneously move in opposite direction with different speeds ( rocko with speed x and hunter with speed 2x). In each move they can hop to another check post. Note each check post is unit distance on periphery of polygon from another check post.
Now what they want to find is at what distance from start point will they meet. Since both rocko and hunter are bit poor in mathematics, so they want your help to find that distance for them.
Note they can't meet in middle of two check posts.
Ex: suppose size of ground is 2 units.
1 move: Rocko:1>2 and Hunter:1>2>1
2 move: Rocko:2>1 and Hunter:1>2>1
Thus, 1 is meeting point and its distance from start is 11=0
Input
There is a single positive integer T (T <= 100000) on the first line of input which corresponds to the number of tests cases. Then T lines follow, each containing a number N which represents size of polygon field, where 0<N<=10^17
Output
T lines containing distance of meeting point from start.
Example
Input: 2
1
2
Output:
0
0
hide comments
saurav_555:
20200302 23:23:56
easy peasy...


NISHANT RAJ:
20140224 20:05:37
finally moved to tutorial.. 

Francky:
20140224 18:39:17
It is tutorial stuff ; moved. 

Jacob Plachta:
20140224 00:44:34
This problem probably belongs in Tutorial. 

abdelkarim:
20140221 21:08:29
@RIVU DAS the same here :D 

NISHANT RAJ:
20140225 08:38:12
it should be moved to tutorial.. 

Bhavik:
20140221 16:48:29
too easy... 

aqfaridi:
20140221 09:11:18
my 400th.. :) 

NISHANT RAJ:
20140225 08:38:18
Last edit: 20140219 19:45:29 

RIVU DAS:
20140219 15:01:31
Reminded me of the movie!!! :p 
Added by:  aman jain 
Date:  20140219 
Time limit:  1s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 
Resource:  Own Problem 