#include using namespace std; using ll = long long; using pii = pair; using pll = pair; using vi = vector; using vvi = vector; using vl = vector; using vvl = vector; using vb = vector; using vvb = vector; #define LLINF 9223372036854775807 #define MOD ll(998244353) #define all(x) (x).begin(),(x).end() #define dbg(x) cerr<<#x<<": "<> a >> b; ll c = min(a, b); if(a == b){c--;} ll ans = 0; ll t = 1; for(int i = 0; i < 1000; i++){ t *= 2; if(t-1 <= c){ans = t-1;} else{ cout << ans << endl; break; } } return 0; }