a,b=map(int,input().split())
a-=1
a+=((a+1)//2)%2-(a%2)*a
b+=((b+1)//2)%2-(b%2)*b
print(a^b) a,b=map(int,input().split()) a map(int,input().split()) map int input().split() ().split () input split b a-=1 a 1 a+=((a+1)//2)%2-(a%2)*a a ((a+1)//2)%2-(a%2)*a ((a+1)//2)%2 (a+1)//2 a+1 a 1 2 2 (a%2)*a a%2 a 2 a b+=((b+1)//2)%2-(b%2)*b b ((b+1)//2)%2-(b%2)*b ((b+1)//2)%2 (b+1)//2 b+1 b 1 2 2 (b%2)*b b%2 b 2 b print(a^b) print a^b a b a+=((a+1)//2)%2-(a%2)*a ((a+1)//2)%2-(a%2)*a a b=map(int,input().split()) map(int,input().split()) b a,b=map(int,input().split()) map(int,input().split()) a b+=((b+1)//2)%2-(b%2)*b ((b+1)//2)%2-(b%2)*b b a-=1 1 a
a,b=map(int,input().split())
a-=1
a+=((a+1)//2)%2-(a%2)*a
b+=((b+1)//2)%2-(b%2)*b
print(a^b)