#include using namespace std; #define rep(i, s, n) for (int i = (s); i < (int)(n); i++) int main() { string s, t; cin >>s >> t; if(s > t) swap(s, t); while(s.size() < t.size()) { s = '0' + s; } string ans = ""; rep(i, 0, s.size()) { if(s[i] == '1') { if(t[i] == '0') ans += '1'; else ans += '0'; } else { if(t[i] == '0') ans += '0'; else ans += '1'; } } int z = 0; rep(i, 0, ans.size()) { z *= 2; if(ans[i] == '1') z++; } cout << z << endl; }