//#define _GLIBCXX_DEBUG #include using namespace std; using ll = long long; const double pi = 3.14159265359879323846264338327950288419; const int INF = 2147483647; using p = pair; int main() { bitset<30> a, b; cin >> a >> b; auto tmp = a^b; ll now = 1, ans = 0; for(int i = 0; i < 30; i++){ if(tmp.test(i)) ans += now; now *= 2; } cout << ans << endl; }