#include using namespace std; int main() { int A, B; cin >> A >> B; cout << min(min(A, B), A ^ B) << endl; }