Ned has free time so he decide to play a game.In this game he take a random flower with n petals.He numbers the petals from 1 to n and pluck each petal until all the petals are fallen.He start with the first petal(petal with number 1),pluck it leaves the next and again pluck another and again leaves the next one and pluck another. He do it again an again until all the petals are plucked from the flower.
Input:
First line contains t, number of test cases.
Each t lines conatin n (number of petals).
Output:
Petal number plucked in the end of the game.
Constaints
1<=T<=10
2<=n<10^10
For 7 petals flower
First he pluck the 1st petal
Leaves the 2nd petal and pluck 3rd petal
Leaves the 4th and pluck 5th petal
leaves 6th and pluck 7th petal
leaves the 2nd and pluck 4th
leaves 6th and pluck 2nd petal
at the end he pluck the 6th petal so output is 6.