Time Limit : sec, Memory Limit : KB
English / Japanese  

Power of 2

 

Convert the given number to the largest power of two that is less than or equal to the number. For example, if it is 2 or 3, convert it to $2^1=2$. Similarly, if the number is 4, 5, 6, or 7, convert it to $2^2=4$; if the number is 8, 9, 10, 11,...,15, convert it to $2^3=8$.

Write a program that converts a given number to the largest power of two among the numbers less than or equal to that number.

Input

The input is given in the following form.

$N$

The number $N$ ($2 \leq N \leq 10^6$) is given in one line.

Output

Output the converted number in one line.

Sample Input and Output

Sample Input 1

54

Sample Output 1

32

Sample Input 2

1024

Sample Output 2

1024