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