#include using namespace std; int main() { string A; string B; cin >> A >> B; cout << ((stoi(A, 0, 2)) ^ (stoi(B, 0, 2))); }