Given an integer A which denotes the number of people standing in the queue.
A selection process follows a rule where people standing on even positions are selected.
Of the selected people a queue is formed and again out of these only people on even position are selected.
This continues until we are left with one person. Find and return the position of that person in the original queue.
The only argument given is integer A.
Return the position of the last selected person in the original queue.
1 <= A <= 10^9
Input 1: A = 10 Output 1: 8 Input 2: A = 20 Output 2: 16
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a doubt? Checkout Sample Codes for more details.