B. The Sparsest Number in Between
time limit per test
2 seconds
memory limit per test
1024 megabytes
input
standard input
output
standard output

You are given a pair of positive integers $$$a$$$ and $$$b$$$ $$$(a \le b)$$$. Among those integers between $$$a$$$ and $$$b$$$, inclusive, your task is to find the sparsest one, that is, the one with the least number of 1's in its binary representation. If there are two or more such integers, you should find the smallest among them.

Suppose, for instance, that $$$a=10$$$ and $$$b=13$$$. The integers between $$$a$$$ and $$$b$$$, inclusive, are $$$10$$$, $$$11$$$, $$$12$$$, and $$$13$$$, and their binary representations are 1010, 1011, 1100, and 1101, respectively. Thus, in this case, the answer is $$$10$$$, since $$$10$$$ and $$$12$$$ have the least number of 1's in their binary representations and $$$10$$$ is smaller than $$$12$$$.

Input

The input consists of a single test case of the following format.

$$$a$$$ $$$b$$$

Here, $$$a$$$ and $$$b$$$ $$$(a \le b)$$$ are integers between $$$1$$$ and $$$10^{18}$$$, inclusive.

Output

Output a line containing the smallest among the sparsest integers between $$$a$$$ and $$$b$$$, inclusive.

Examples
Input
10 13
Output
10
Input
11 15
Output
12
Input
11 20
Output
16
Input
1 1000000000000000000
Output
1
Input
9876543210 9876543210
Output
9876543210