def count1(x, m):
  return x // (2 * m) * m + max(0, x % (2 * m) - m)

a, b = map(int, input().split())
ans = 0
m = 1
while m <= 2 * b:
  ans += (count1(b + 1, m) - count1(a, m)) % 2 * m
  m *= 2
print(ans) def count1(x, m):
  return x // (2 * m) * m + max(0, x % (2 * m) - m) count1 return x // (2 * m) * m + max(0, x % (2 * m) - m) x // (2 * m) * m + max(0, x % (2 * m) - m) x // (2 * m) * m x // (2 * m) x 2 * m 2 m m max(0, x % (2 * m) - m) max 0 x % (2 * m) - m x % (2 * m) x 2 * m 2 m m x x m m a, b = map(int, input().split()) a map(int, input().split()) map int input().split() ().split () input split b ans = 0 ans 0 m = 1 m 1 while m <= 2 * b:
  ans += (count1(b + 1, m) - count1(a, m)) % 2 * m
  m *= 2 m <= 2 * b m 2 * b 2 b ans += (count1(b + 1, m) - count1(a, m)) % 2 * m ans (count1(b + 1, m) - count1(a, m)) % 2 * m (count1(b + 1, m) - count1(a, m)) % 2 count1(b + 1, m) - count1(a, m) count1(b + 1, m) count1 b + 1 b 1 m count1(a, m) count1 a m 2 m m *= 2 m 2 print(ans) print ans m *= 2 2 m def count1(x, m):
  return x // (2 * m) * m + max(0, x % (2 * m) - m) def count1(x, m):
  return x // (2 * m) * m + max(0, x % (2 * m) - m) count1 m = 1 1 m b = map(int, input().split()) map(int, input().split()) b a, b = map(int, input().split()) map(int, input().split()) a ans = 0 0 ans ans += (count1(b + 1, m) - count1(a, m)) % 2 * m (count1(b + 1, m) - count1(a, m)) % 2 * m ans
def count1(x, m):
  return x // (2 * m) * m + max(0, x % (2 * m) - m)

a, b = map(int, input().split())
ans = 0
m = 1
while m <= 2 * b:
  ans += (count1(b + 1, m) - count1(a, m)) % 2 * m
  m *= 2
print(ans)
