import sys readline=sys.stdin.readline A,B=map(int,readline().split()) ans=A^B print(ans)