Furude_Rika has a deck of cards. Every card has a unique integer number written on it.She says that her cards are numbered starting from 1, and if a card with number N exists, then a card with number N+1 exists.
Yes She may have an infinite sequence !
Yesterday when she went to school, her roommate Satoko played with her cards by sorting them into two boxes according to the numbers written on them by repeating the following two steps:
1.Take the card with the smallest number, let it be X.
2.Put the card with number X in the first box and put the card with number 2*X in the second box.
So the first few numbers in the boxes will be:
First box : 1,3,4,5,7,...
Second box : 2,6,8,10,14,...
Furude_Rika came back home and she asked Satoko for the card with number Q written on it. Help Satoko to find out in which box she can find the required card.