a = int(input()) b = int(input()) c = str(a^b) print(int(c,2))