A, B = map(int, input().split())
n = 2
answer = ((B+1)//2-A//2)%2
A -= 1
while n <= B:
  cnt_b = 0
  if (B//n)%2 != 0:
    cnt_b += B%n
  cnt_b += B//n
  cnt_a = 0
  if (A//n)%2 != 0:
    cnt_a += A%n
  cnt_a += A//n
  if (cnt_b-cnt_a)%2 != 0:
    answer += n
  n *= 2
print(answer)
   A, B = map(int, input().split()) A map(int, input().split()) map int input().split() ().split () input split B n = 2 n 2 answer = ((B+1)//2-A//2)%2 answer ((B+1)//2-A//2)%2 (B+1)//2-A//2 (B+1)//2 B+1 B 1 2 A//2 A 2 2 A -= 1 A 1 while n <= B:
  cnt_b = 0
  if (B//n)%2 != 0:
    cnt_b += B%n
  cnt_b += B//n
  cnt_a = 0
  if (A//n)%2 != 0:
    cnt_a += A%n
  cnt_a += A//n
  if (cnt_b-cnt_a)%2 != 0:
    answer += n
  n *= 2 n <= B n B cnt_b = 0 cnt_b 0 if (B//n)%2 != 0:
    cnt_b += B%n
   (B//n)%2 != 0 (B//n)%2 B//n B n 2 0 cnt_b += B%n cnt_b B%n B n cnt_b += B//n cnt_b B//n B n cnt_a = 0 cnt_a 0 if (A//n)%2 != 0:
    cnt_a += A%n
   (A//n)%2 != 0 (A//n)%2 A//n A n 2 0 cnt_a += A%n cnt_a A%n A n cnt_a += A//n cnt_a A//n A n if (cnt_b-cnt_a)%2 != 0:
    answer += n
   (cnt_b-cnt_a)%2 != 0 (cnt_b-cnt_a)%2 cnt_b-cnt_a cnt_b cnt_a 2 0 answer += n answer n n *= 2 n 2 print(answer) print answer cnt_a = 0 0 cnt_a cnt_b = 0 0 cnt_b n *= 2 2 n answer = ((B+1)//2-A//2)%2 ((B+1)//2-A//2)%2 answer answer += n n answer A, B = map(int, input().split()) map(int, input().split()) A cnt_a += A%n A%n cnt_a cnt_a += A//n A//n cnt_a cnt_b += B%n B%n cnt_b A -= 1 1 A B = map(int, input().split()) map(int, input().split()) B n = 2 2 n cnt_b += B//n B//n cnt_b
A, B = map(int, input().split())
n = 2
answer = ((B+1)//2-A//2)%2
A -= 1
while n <= B:
  cnt_b = 0
  if (B//n)%2 != 0:
    cnt_b += B%n
  cnt_b += B//n
  cnt_a = 0
  if (A//n)%2 != 0:
    cnt_a += A%n
  cnt_a += A//n
  if (cnt_b-cnt_a)%2 != 0:
    answer += n
  n *= 2
print(answer)
  
