#include using namespace std; int main() { long long a, b, c; cin >> a >> c; b = a ^ c; cout << b << endl; return 0; }