x,y=map(int,input().split()) print(min(x,y,(x^y)))