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