A, C = map(lambda x: int(x), input().split()) print(A ^ C)