#include using namespace std; using ll = long long; signed main() { cin.tie(0)->sync_with_stdio(0); cin.exceptions(cin.failbit); unsigned x, y; cin >> x >> y; if (__builtin_clz(x) > __builtin_clz(y)) { swap(x, y); } unsigned ans = 0; if (__builtin_clz(x) == __builtin_clz(y)) { ans = (1 << (31 - __builtin_clz(y))) - 1; } else { ans = y; } cout << ans << '\n'; return 0; }