a, b = map(int, input().split())

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

cnt = b - a + 1
cnt -= (a % 2 == 1) + (b % 2 == 0)
a, b = a * (a % 2 == 1), b * (b % 2 == 0)
print((cnt // 2 % 2) ^ a ^ b)
