#include using namespace std; int main() { int A, B; cin >> A >> B; int mx = 0; for (int x = 0; x < A; ++x) { for (int y = 0; y < B; ++y) { int mn = min(A, min(B, A ^ B)); if (mn > mx) mx = mn; } } cout << mx << endl; }