#include using namespace std; int main(){ int A,B; cin >> A >> B; cout << (A xor B) << endl; return 0; }