A,B = map(int,input().split())
A = A-1
a = A % 2 
b = B % 2

if a == 1:
  A = (A+1)//2%2
else:
  A += (A//2)%2
if b == 1:
  B = (B+1)//2%2
else:
  B += (B//2)%2

ans = [0 for i in range(100)]

bin_a = format(A, 'b')
bin_b = format(B, 'b')

for i in range(len(bin_a)):
  ans[len(bin_a)-i-1] += int( bin_a[i] )
for i in range(len(bin_b)):
  ans[len(bin_b)-i-1] += int( bin_b[i] )
for i in range(100):
  ans[i] = ans[i]%2

a=0
for i in range(100):
  a += ans[i] * (2**i)
print(int(a)) A,B = map(int,input().split()) A map(int,input().split()) map int input().split() ().split () input split B A = A-1 A A-1 A 1 a = A % 2 a A % 2 A 2 b = B % 2 b B % 2 B 2 if a == 1:
  A = (A+1)//2%2
else:
  A += (A//2)%2 a == 1 a 1 A = (A+1)//2%2 A (A+1)//2%2 (A+1)//2 A+1 A 1 2 2 A += (A//2)%2 A (A//2)%2 A//2 A 2 2 if b == 1:
  B = (B+1)//2%2
else:
  B += (B//2)%2 b == 1 b 1 B = (B+1)//2%2 B (B+1)//2%2 (B+1)//2 B+1 B 1 2 2 B += (B//2)%2 B (B//2)%2 B//2 B 2 2 0 for i in range(100) for i in range(100) i range(100) range 100 for i in range(100) 0 ans = [0 for i in range(100)] ans [0 for i in range(100)] bin_a = format(A, 'b') bin_a format(A, 'b') format A 'b' bin_b = format(B, 'b') bin_b format(B, 'b') format B 'b' for i in range(len(bin_a)):
  ans[len(bin_a)-i-1] += int( bin_a[i] ) i range(len(bin_a)) range len(bin_a) len bin_a ans[len(bin_a)-i-1] += int( bin_a[i] ) ans[len(bin_a)-i-1] ans len(bin_a)-i-1 len(bin_a)-i len(bin_a) len bin_a i 1 int( bin_a[i] ) int bin_a[i] bin_a i for i in range(len(bin_b)):
  ans[len(bin_b)-i-1] += int( bin_b[i] ) i range(len(bin_b)) range len(bin_b) len bin_b ans[len(bin_b)-i-1] += int( bin_b[i] ) ans[len(bin_b)-i-1] ans len(bin_b)-i-1 len(bin_b)-i len(bin_b) len bin_b i 1 int( bin_b[i] ) int bin_b[i] bin_b i for i in range(100):
  ans[i] = ans[i]%2 i range(100) range 100 ans[i] = ans[i]%2 ans[i] ans i ans[i]%2 ans[i] ans i 2 a=0 a 0 for i in range(100):
  a += ans[i] * (2**i) i range(100) range 100 a += ans[i] * (2**i) a ans[i] * (2**i) ans[i] ans i 2**i 2 i print(int(a)) print int(a) int a ans = [0 for i in range(100)] [0 for i in range(100)] ans bin_b = format(B, 'b') format(B, 'b') bin_b A += (A//2)%2 (A//2)%2 A A = (A+1)//2%2 (A+1)//2%2 A a += ans[i] * (2**i) ans[i] * (2**i) a B = map(int,input().split()) map(int,input().split()) B A = A-1 A-1 A a = A % 2 A % 2 a A,B = map(int,input().split()) map(int,input().split()) A B += (B//2)%2 (B//2)%2 B bin_a = format(A, 'b') format(A, 'b') bin_a b = B % 2 B % 2 b B = (B+1)//2%2 (B+1)//2%2 B a=0 0 a
A,B = map(int,input().split())
A = A-1
a = A % 2 
b = B % 2

if a == 1:
  A = (A+1)//2%2
else:
  A += (A//2)%2
if b == 1:
  B = (B+1)//2%2
else:
  B += (B//2)%2

ans = [0 for i in range(100)]

bin_a = format(A, 'b')
bin_b = format(B, 'b')

for i in range(len(bin_a)):
  ans[len(bin_a)-i-1] += int( bin_a[i] )
for i in range(len(bin_b)):
  ans[len(bin_b)-i-1] += int( bin_b[i] )
for i in range(100):
  ans[i] = ans[i]%2

a=0
for i in range(100):
  a += ans[i] * (2**i)
print(int(a))