A,B = map(int,input().split())
dif = B-A+1
MAX = 45
ans = 0
for i in range(1,MAX):
  base = pow(2,i)
  if (B+1)%base <= base//2:
    up = ((B+1)//base)*(base//2)
  else:
    up = ((B+1)//base)*(base//2) + (B+1)%base - base//2
  if A%base <= base//2:
    down = (A//base)*(base//2)
  else:
    down = (A//base)*(base//2) + A%base - base//2
  ans += (up-down)%2*(base//2)
print(ans) A,B = map(int,input().split()) A map(int,input().split()) map int input().split() ().split () input split B dif = B-A+1 dif B-A+1 B-A B A 1 MAX = 45 MAX 45 ans = 0 ans 0 for i in range(1,MAX):
  base = pow(2,i)
  if (B+1)%base <= base//2:
    up = ((B+1)//base)*(base//2)
  else:
    up = ((B+1)//base)*(base//2) + (B+1)%base - base//2
  if A%base <= base//2:
    down = (A//base)*(base//2)
  else:
    down = (A//base)*(base//2) + A%base - base//2
  ans += (up-down)%2*(base//2) i range(1,MAX) range 1 MAX base = pow(2,i) base pow(2,i) pow 2 i if (B+1)%base <= base//2:
    up = ((B+1)//base)*(base//2)
  else:
    up = ((B+1)//base)*(base//2) + (B+1)%base - base//2
   (B+1)%base <= base//2 (B+1)%base B+1 B 1 base base//2 base 2 up = ((B+1)//base)*(base//2) up ((B+1)//base)*(base//2) (B+1)//base B+1 B 1 base base//2 base 2 up = ((B+1)//base)*(base//2) + (B+1)%base - base//2 up ((B+1)//base)*(base//2) + (B+1)%base - base//2 ((B+1)//base)*(base//2) + (B+1)%base ((B+1)//base)*(base//2) (B+1)//base B+1 B 1 base base//2 base 2 (B+1)%base B+1 B 1 base base//2 base 2 if A%base <= base//2:
    down = (A//base)*(base//2)
  else:
    down = (A//base)*(base//2) + A%base - base//2
   A%base <= base//2 A%base A base base//2 base 2 down = (A//base)*(base//2) down (A//base)*(base//2) A//base A base base//2 base 2 down = (A//base)*(base//2) + A%base - base//2 down (A//base)*(base//2) + A%base - base//2 (A//base)*(base//2) + A%base (A//base)*(base//2) A//base A base base//2 base 2 A%base A base base//2 base 2 ans += (up-down)%2*(base//2) ans (up-down)%2*(base//2) (up-down)%2 up-down up down 2 base//2 base 2 print(ans) print ans B = map(int,input().split()) map(int,input().split()) B MAX = 45 45 MAX dif = B-A+1 B-A+1 dif down = (A//base)*(base//2) + A%base - base//2 (A//base)*(base//2) + A%base - base//2 down base = pow(2,i) pow(2,i) base up = ((B+1)//base)*(base//2) ((B+1)//base)*(base//2) up up = ((B+1)//base)*(base//2) + (B+1)%base - base//2 ((B+1)//base)*(base//2) + (B+1)%base - base//2 up A,B = map(int,input().split()) map(int,input().split()) A ans += (up-down)%2*(base//2) (up-down)%2*(base//2) ans ans = 0 0 ans down = (A//base)*(base//2) (A//base)*(base//2) down
A,B = map(int,input().split())
dif = B-A+1
MAX = 45
ans = 0
for i in range(1,MAX):
  base = pow(2,i)
  if (B+1)%base <= base//2:
    up = ((B+1)//base)*(base//2)
  else:
    up = ((B+1)//base)*(base//2) + (B+1)%base - base//2
  if A%base <= base//2:
    down = (A//base)*(base//2)
  else:
    down = (A//base)*(base//2) + A%base - base//2
  ans += (up-down)%2*(base//2)
print(ans)
