#include // #include #define rep(i,n) for(ll i = 0; i < (n); ++i) #define srep(i,s,t) for(ll i = s; i < t; ++i) #define drep(i,n) for(ll i = (n)-1; i >= 0; --i) using namespace std; // using namespace atcoder; typedef long long int ll; typedef pair P; #define yn {puts("Yes");}else{puts("No");} #define MAX_N 500005 vector kitei(vector a){ int n = a.size(); int now = 0; for(int i = 62; i >= 0; i--){ for(int j = now + 1; j < n; j++){ if(a[j] & (1LL< res; for(int i = 0; i < now; i++) res.push_back(a[i]); return res; } int main() { int n; cin >> n; vector a(n); rep(i,n) cin >> a[i]; vector v = kitei(a); int m = v.size(); ll ans = 1LL << m; cout << ans << endl; return 0; }