#include using namespace std; int main(){ bitset<30> a, b; cin >> a >> b; cout << (a ^ b).to_ullong() << '\n'; }