a, c = map(int, input().split()) b = a ^ c print(b)