#include using namespace std; int main(){ int64_t A, B; cin >> A >> B; int64_t a = 1, b = 1; while(A >= a * 2) a <<= 1; while(B >= b * 2) b <<= 1; if(a == b){ cout << a - 1 << '\n'; return 0; } if(a < b){ swap(a, b); swap(A, B); } cout << B << '\n'; }