K, N = map(int, input().split()) print(K^N) print("\n")