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