from pprint import pprint def main(): a,c=map(int,input().split()) b=a^c print(b) if __name__ == "__main__": main()