#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; int main() { int i, j, k; long long a, c; cin >> a >> c; bitset<50>aa(a); bitset<50>cc(c); //cout << aa << endl; string ast = aa.to_string(); string cst = cc.to_string(); string bst; for (i = 0; i < ast.length(); i++) { if (ast[i] == '1' && cst[i] == '0') { bst += '1'; } else if (ast[i] == '0' && cst[i] == '0') { bst += '0'; } else if (ast[i] == '1' && cst[i] == '1') { bst += '0'; } else if (ast[i] == '0' && cst[i] == '1') { bst += '1'; } } long long b = 0; long long keta = 1; for (i = bst.length() - 1; i >= 0; i--) { b += ((int)bst[i] - 48) * keta; keta++; } cout << b << endl; getchar(); getchar(); return 0; }