#include using namespace std; int main() { long long a,c; cin >> a >> c; cout << (a ^ c) << endl; return 0; }