x=map(int,input().split()) print(x[0]^x[1])