A little girl loves problems on bitwise operations very much. Here's one of them.

You are given two integers *l* and *r*. Let's consider the values of <img align="middle" class="tex-formula" src="https://espresso.codeforces.com/9b77fab607849cb208cd8aab633b62d894fc3358.png" style="max-width: 100.0%;max-height: 100.0%;"/> for all pairs of integers *a* and *b* (*l* ≤ *a* ≤ *b* ≤ *r*). Your task is to find the maximum value among all considered ones.

Expression <img align="middle" class="tex-formula" src="https://espresso.codeforces.com/b364f2e04c665b78b924ec10666327a4ef4635bc.png" style="max-width: 100.0%;max-height: 100.0%;"/> means applying bitwise excluding or operation to integers *x* and *y*. The given operation exists in all modern programming languages, for example, in languages *C*++ and *Java* it is represented as "^", in *Pascal* — as "xor".
The single line contains space-separated integers *l* and *r* (1 ≤ *l* ≤ *r* ≤ 10<sup class="upper-index">18</sup>).

Please, do not use the %lld specifier to read or write 64-bit integers in C++. It is preferred to use the cin, cout streams or the %I64d specifier.
import sys
#import threading
#sys.setrecursionlimit(10**8)
#threading.stack_size(10**8)
input = sys.stdin.readline

############ ---- Input Functions ---- ############
def inp():
    return(int(input()))
def inlt():
    return(list(map(int,input().split())))
def insr():
    s = input()
    return(list(s[:len(s) - 1]))
def invr():
    return(map(int,input().split()))
############ ---- Input Functions ---- ############

def Little_Girl_and_Maximum_XOR():
    def convert_binary_string_to_num(new_binary):
        num_pos = len(new_binary)
        num_value = 0 
        power = 0
        for i in range(num_pos-1,-1,-1):
            num_value += int(new_binary[i])*(2**power)
            power += 1 
        
        return num_value


    l,r = invr()

    binary_l = bin(l).split('b')[1]
    binary_r = bin(r).split('b')[1]

    if binary_l == binary_r:
        print(0)

    elif len(binary_r) != len(binary_l):
        new_binary = ['1']*len(binary_r)
        corresponding_num = convert_binary_string_to_num(new_binary)
        print(corresponding_num)
    
    else: 

        not_matching_index = 0 
        while True:
            if binary_r[not_matching_index] != binary_l[not_matching_index]:
                break 
            else:
                not_matching_index += 1 
        
        print(not_matching_index)

        new_binary = binary_r[:not_matching_index] + ('1')*(len(binary_r)-not_matching_index)
        corresponding_num = convert_binary_string_to_num(new_binary)
        print(corresponding_num)
    
    return 


Little_Girl_and_Maximum_XOR()