#P2431. 正妹吃月饼

正妹吃月饼

Description

Today is the Mid-Autumn Festival. uim brought a bunch of mooncakes of different sizes and flavors.

The masses of these mooncakes are 1g,2g,4g,8g,16g1g,2g,4g,8g,16g... each one is twice the previous. There is exactly one of each kind.

uim lets the pretty girl eat whatever she wants.

She wants to try as many flavors as possible, so she will eat as many mooncakes as possible (by count, not by weight). Also, she is indeed a bit hungry; she needs to eat at least AgA\text{g} in total to be satisfied.

However, she is afraid of gaining weight, so the total amount of mooncakes she eats cannot exceed BgB\text{g}.

She wants to know the maximum number of mooncakes she can eat.

Input Format

One line containing two numbers, A,BA,B.

Output Format

Output the maximum number of mooncakes she can eat.

16 25
4

Hint

Sample Explanation:

She can eat 1,2,4,161,2,4,16, which are 44 mooncakes (there may be multiple ways).

Constraints:

For 30%30\% of the testdata, 1A,B10001 \le A,B \le 1000;

For 60%60\% of the testdata, 1A,B1000001 \le A,B \le 100000;

For 100%100\% of the testdata, 1A,B26311 \le A,B \le 2^{63}-1.

Translated by ChatGPT 5