A,B=map(int,input().split())
if A%2:
    s1=((A+1)//2)%2
else:
    s1=((A//2)%2)^A
if B%2:
    s2=((B+1)//2)%2
else:
    s2=((B//2)%2)^B
print(s1^s2^A) A,B=map(int,input().split()) A map(int,input().split()) map int input().split() ().split () input split B if A%2:
    s1=((A+1)//2)%2
else:
    s1=((A//2)%2)^A A%2 A 2 s1=((A+1)//2)%2 s1 ((A+1)//2)%2 (A+1)//2 A+1 A 1 2 2 s1=((A//2)%2)^A s1 ((A//2)%2)^A (A//2)%2 A//2 A 2 2 A if B%2:
    s2=((B+1)//2)%2
else:
    s2=((B//2)%2)^B B%2 B 2 s2=((B+1)//2)%2 s2 ((B+1)//2)%2 (B+1)//2 B+1 B 1 2 2 s2=((B//2)%2)^B s2 ((B//2)%2)^B (B//2)%2 B//2 B 2 2 B print(s1^s2^A) print s1^s2^A s1^s2 s1 s2 A s1=((A+1)//2)%2 ((A+1)//2)%2 s1 s1=((A//2)%2)^A ((A//2)%2)^A s1 s2=((B//2)%2)^B ((B//2)%2)^B s2 A,B=map(int,input().split()) map(int,input().split()) A B=map(int,input().split()) map(int,input().split()) B s2=((B+1)//2)%2 ((B+1)//2)%2 s2
A,B=map(int,input().split())
if A%2:
    s1=((A+1)//2)%2
else:
    s1=((A//2)%2)^A
if B%2:
    s2=((B+1)//2)%2
else:
    s2=((B//2)%2)^B
print(s1^s2^A)