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