innums = [int(x) for x in input().split()] print(innums[0]^innums[1])