#include <bits/stdc++.h>
using namespace std;

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    long long A, C;
    cin >> A >> C;
    cout << (A ^ C) << endl;
    return 0;
}