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