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