Question
Divide King
Kael is given an integer M. Identify the number Y from 1 to M (inclusive) that can be divided by 2 the greatest number of times. The solution is guaranteed to be unique.
Input
The first line of the input contains a single integer M.
Constraints
1 ≤ M ≤ 1018
Constraints
1 ≤ M ≤ 1018
Output
Print the integer Y from 1 to M (both inclusive) from which we can divide 2, the most number of times.
Example
Sample Input
10
Sample Output
8
Explanation
We can divide 2 from 8, 3 times, i. e, 8 -> 4 -> 2 -> 1
There is no other integer from 1 to M from which we can divide 2, atleast 3 times.
10
Sample Output
8
Explanation
We can divide 2 from 8, 3 times, i. e, 8 -> 4 -> 2 -> 1
There is no other integer from 1 to M from which we can divide 2, atleast 3 times.