x, y = map(int, input().split()) sum = 0 sum = x ^ y print(sum)