# coding: utf-8 # Your code here! A,B=map(int,input().split()) print(A^B)