#include "bits/stdc++.h" typedef long long ll; using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); // -------------------------------------- ll A, B, C; cin >> A >> C; B = A^C; cout << B << "\n"; }