a, b = map(int, input().split())
def f(x):
    return 0 if x <= 0 else x >> 1 & 1 ^ 1 if x & 1 else f(x - 1) | x
print(f(b) ^ f(max(0, a - 1))) a, b = map(int, input().split()) a map(int, input().split()) map int input().split() ().split () input split b def f(x):
    return 0 if x <= 0 else x >> 1 & 1 ^ 1 if x & 1 else f(x - 1) | x f return 0 if x <= 0 else x >> 1 & 1 ^ 1 if x & 1 else f(x - 1) | x 0 if x <= 0 else x >> 1 & 1 ^ 1 if x & 1 else f(x - 1) | x x <= 0 x 0 0 x >> 1 & 1 ^ 1 if x & 1 else f(x - 1) | x x & 1 x 1 x >> 1 & 1 ^ 1 x >> 1 & 1 x >> 1 x 1 1 1 f(x - 1) | x f(x - 1) f x - 1 x 1 x x x print(f(b) ^ f(max(0, a - 1))) print f(b) ^ f(max(0, a - 1)) f(b) f b f(max(0, a - 1)) f max(0, a - 1) max 0 a - 1 a 1 def f(x):
    return 0 if x <= 0 else x >> 1 & 1 ^ 1 if x & 1 else f(x - 1) | x def f(x):
    return 0 if x <= 0 else x >> 1 & 1 ^ 1 if x & 1 else f(x - 1) | x f b = map(int, input().split()) map(int, input().split()) b a, b = map(int, input().split()) map(int, input().split()) a
a, b = map(int, input().split())
def f(x):
    return 0 if x <= 0 else x >> 1 & 1 ^ 1 if x & 1 else f(x - 1) | x
print(f(b) ^ f(max(0, a - 1)))