from sys import stdin def main(): input = lambda: stdin.readline()[:-1] A, B = map(int, input().split()) print(A ^ B) main()