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