#include #include #include using namespace atcoder; using mint = modint998244353; using namespace std; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf32 1000000001 #define Inf64 4000000000000000001 int main() { int n; cin>>n; vector> a(1); rep(i,n){ int x; cin>>x; a[0].push_back(x); } long long ans = 1; for(int i=29;i>=0;i--){ bool f = false; vector> b; rep(j,a.size()){ vector t[2]; rep(k,a[j].size()){ t[(a[j][k]>>i)&1].push_back(a[j][k]); } if(t[0].size()!=0&&t[1].size()!=0)f = true; if(t[0].size()!=0)b.push_back(t[0]); if(t[1].size()!=0)b.push_back(t[1]); } swap(a,b); if(f)ans *= 2; } cout<