#include #include #include using namespace std; string to_binary(long bina){ string ans = ""; for(int i = 0; bina > 0; i++){ ans = to_string(bina % 2) + ans; bina /= 2; } return ans; } long binary_to_num(string bina){ long ans = 0; for(int i = 0; i < bina.size(); i++){ ans += (bina[bina.size() - i - 1] - '0') * pow(2, i); } return ans; } int main(){ long A, C; cin >> A >> C; string binaryA = to_binary(A), binaryC = to_binary(C), binaryB = ""; for(int i = 0; i < binaryC.size() - binaryA.size(); i++){ binaryA = "0" + binaryA; } for(int i = 0; i < binaryC.size(); i++){ if(binaryA[i] == binaryC[i]){ binaryB.push_back('0'); }else{ binaryB.push_back('1'); } } cout << binary_to_num(binaryB) << endl; }