def getlist(): return list(map(int, input().split())) A, C = getlist() print(A ^ C)