from math import ceil


def main():
    a, b = map(int, input().split())
    answer = 0
    if a < b:
        for i in range(a, ceil(a / 4) * 4):
            answer ^= i
        for i in range((b // 4) * 4, b + 1):
            answer ^= i
    else:
        answer = a
    print(answer)


if __name__ == '__main__':
    main()
 from math import ceil def main():
    a, b = map(int, input().split())
    answer = 0
    if a < b:
        for i in range(a, ceil(a / 4) * 4):
            answer ^= i
        for i in range((b // 4) * 4, b + 1):
            answer ^= i
    else:
        answer = a
    print(answer) main a, b = map(int, input().split()) a map(int, input().split()) map int input().split() ().split () input split b answer = 0 answer 0 if a < b:
        for i in range(a, ceil(a / 4) * 4):
            answer ^= i
        for i in range((b // 4) * 4, b + 1):
            answer ^= i
    else:
        answer = a
     a < b a b for i in range(a, ceil(a / 4) * 4):
            answer ^= i
         i range(a, ceil(a / 4) * 4) range a ceil(a / 4) * 4 ceil(a / 4) ceil a / 4 a 4 4 answer ^= i answer i for i in range((b // 4) * 4, b + 1):
            answer ^= i
     i range((b // 4) * 4, b + 1) range (b // 4) * 4 b // 4 b 4 4 b + 1 b 1 answer ^= i answer i answer = a answer a print(answer) print answer if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    a, b = map(int, input().split())
    answer = 0
    if a < b:
        for i in range(a, ceil(a / 4) * 4):
            answer ^= i
        for i in range((b // 4) * 4, b + 1):
            answer ^= i
    else:
        answer = a
    print(answer) def main():
    a, b = map(int, input().split())
    answer = 0
    if a < b:
        for i in range(a, ceil(a / 4) * 4):
            answer ^= i
        for i in range((b // 4) * 4, b + 1):
            answer ^= i
    else:
        answer = a
    print(answer) main
from math import ceil


def main():
    a, b = map(int, input().split())
    answer = 0
    if a < b:
        for i in range(a, ceil(a / 4) * 4):
            answer ^= i
        for i in range((b // 4) * 4, b + 1):
            answer ^= i
    else:
        answer = a
    print(answer)


if __name__ == '__main__':
    main()

