#include using namespace std; using int64 = long long; int main() { int A, B; cin >> A >> B; cout << (A ^ B) << endl; }