a,b=map(int,input().split())
f=lambda x:-(-x//2)%2^x*(x%2^1)
print(f(a-1)^f(b)) a,b=map(int,input().split()) a map(int,input().split()) map int input().split() ().split () input split b f=lambda x:-(-x//2)%2^x*(x%2^1) f lambda x:-(-x//2)%2^x*(x%2^1) -(-x//2)%2^x*(x%2^1) -(-x//2)%2 -(-x//2) -x//2 -x x 2 2 x*(x%2^1) x x%2^1 x%2 x 2 1 x print(f(a-1)^f(b)) print f(a-1)^f(b) f(a-1) f a-1 a 1 f(b) f b a,b=map(int,input().split()) map(int,input().split()) a b=map(int,input().split()) map(int,input().split()) b f=lambda x:-(-x//2)%2^x*(x%2^1) lambda x:-(-x//2)%2^x*(x%2^1) f
a,b=map(int,input().split())
f=lambda x:-(-x//2)%2^x*(x%2^1)
print(f(a-1)^f(b))