a, b = map(int, input().split())
b = b + 1
d = 1
res = 0
t1 = a % 4
t2 = b % 4
ls = [0, 1, 0, 1]
res += (sum(ls[:t2]) - sum(ls[:t1])) % 2
while 2 ** d < max(a, b):
    tmp1 = a % (2 ** (d + 1))
    tmp2 = b % (2 ** (d + 1))
    tmp3 = max(tmp1, tmp2)
    tmp4 = min(tmp1, tmp2)
    if tmp3 >= 2 ** d:
        tmp3 = tmp3 % 2
    else:
        tmp3 = 0
    if tmp4 >= 2 ** d:
        tmp4 = tmp4 % 2
    else:
        tmp4 = 0
    tmp = (tmp4 - tmp3) % 2
    res += tmp * (2 ** d)
    d += 1

print(res) a, b = map(int, input().split()) a map(int, input().split()) map int input().split() ().split () input split b b = b + 1 b b + 1 b 1 d = 1 d 1 res = 0 res 0 t1 = a % 4 t1 a % 4 a 4 t2 = b % 4 t2 b % 4 b 4 ls = [0, 1, 0, 1] ls [0, 1, 0, 1] 0 1 0 1 res += (sum(ls[:t2]) - sum(ls[:t1])) % 2 res (sum(ls[:t2]) - sum(ls[:t1])) % 2 sum(ls[:t2]) - sum(ls[:t1]) sum(ls[:t2]) sum ls[:t2] ls :t2 t2 sum(ls[:t1]) sum ls[:t1] ls :t1 t1 2 while 2 ** d < max(a, b):
    tmp1 = a % (2 ** (d + 1))
    tmp2 = b % (2 ** (d + 1))
    tmp3 = max(tmp1, tmp2)
    tmp4 = min(tmp1, tmp2)
    if tmp3 >= 2 ** d:
        tmp3 = tmp3 % 2
    else:
        tmp3 = 0
    if tmp4 >= 2 ** d:
        tmp4 = tmp4 % 2
    else:
        tmp4 = 0
    tmp = (tmp4 - tmp3) % 2
    res += tmp * (2 ** d)
    d += 1 2 ** d < max(a, b) 2 ** d 2 d max(a, b) max a b tmp1 = a % (2 ** (d + 1)) tmp1 a % (2 ** (d + 1)) a 2 ** (d + 1) 2 d + 1 d 1 tmp2 = b % (2 ** (d + 1)) tmp2 b % (2 ** (d + 1)) b 2 ** (d + 1) 2 d + 1 d 1 tmp3 = max(tmp1, tmp2) tmp3 max(tmp1, tmp2) max tmp1 tmp2 tmp4 = min(tmp1, tmp2) tmp4 min(tmp1, tmp2) min tmp1 tmp2 if tmp3 >= 2 ** d:
        tmp3 = tmp3 % 2
    else:
        tmp3 = 0
     tmp3 >= 2 ** d tmp3 2 ** d 2 d tmp3 = tmp3 % 2 tmp3 tmp3 % 2 tmp3 2 tmp3 = 0 tmp3 0 if tmp4 >= 2 ** d:
        tmp4 = tmp4 % 2
    else:
        tmp4 = 0
     tmp4 >= 2 ** d tmp4 2 ** d 2 d tmp4 = tmp4 % 2 tmp4 tmp4 % 2 tmp4 2 tmp4 = 0 tmp4 0 tmp = (tmp4 - tmp3) % 2 tmp (tmp4 - tmp3) % 2 tmp4 - tmp3 tmp4 tmp3 2 res += tmp * (2 ** d) res tmp * (2 ** d) tmp 2 ** d 2 d d += 1 d 1 print(res) print res t2 = b % 4 b % 4 t2 a, b = map(int, input().split()) map(int, input().split()) a d += 1 1 d b = map(int, input().split()) map(int, input().split()) b tmp4 = min(tmp1, tmp2) min(tmp1, tmp2) tmp4 tmp = (tmp4 - tmp3) % 2 (tmp4 - tmp3) % 2 tmp res += tmp * (2 ** d) tmp * (2 ** d) res res += (sum(ls[:t2]) - sum(ls[:t1])) % 2 (sum(ls[:t2]) - sum(ls[:t1])) % 2 res tmp4 = 0 0 tmp4 d = 1 1 d tmp3 = tmp3 % 2 tmp3 % 2 tmp3 b = b + 1 b + 1 b t1 = a % 4 a % 4 t1 ls = [0, 1, 0, 1] [0, 1, 0, 1] ls tmp3 = 0 0 tmp3 tmp2 = b % (2 ** (d + 1)) b % (2 ** (d + 1)) tmp2 tmp4 = tmp4 % 2 tmp4 % 2 tmp4 res = 0 0 res tmp1 = a % (2 ** (d + 1)) a % (2 ** (d + 1)) tmp1 tmp3 = max(tmp1, tmp2) max(tmp1, tmp2) tmp3
a, b = map(int, input().split())
b = b + 1
d = 1
res = 0
t1 = a % 4
t2 = b % 4
ls = [0, 1, 0, 1]
res += (sum(ls[:t2]) - sum(ls[:t1])) % 2
while 2 ** d < max(a, b):
    tmp1 = a % (2 ** (d + 1))
    tmp2 = b % (2 ** (d + 1))
    tmp3 = max(tmp1, tmp2)
    tmp4 = min(tmp1, tmp2)
    if tmp3 >= 2 ** d:
        tmp3 = tmp3 % 2
    else:
        tmp3 = 0
    if tmp4 >= 2 ** d:
        tmp4 = tmp4 % 2
    else:
        tmp4 = 0
    tmp = (tmp4 - tmp3) % 2
    res += tmp * (2 ** d)
    d += 1

print(res)