#include using namespace std; #define ALL(x) begin(x),end(x) #define rep(i,n) for(int i=0;i<(n);i++) #define debug(v) cout<<#v<<":";for(auto x:v){cout<bool chmax(T &a,const T &b){if(abool chmin(T &a,const T &b){if(b ostream &operator<<(ostream &os,const vector&v){ for(int i=0;i<(int)v.size();i++) os< istream &operator>>(istream &is,vector&v){ for(T &x:v)is>>x; return is; } template struct BinaryBasis{ vector base; BinaryBasis(){} bool add(T bit){ for(auto &x:base) chmin(bit,bit^x); if(bit){ base.push_back(bit); return true; } return false; } T solve(T r){ T ret=0; for(auto &x:base)if(chmin(r,r^x)) ret^=x; if(r) return -1; return ret; } void normalize(){ for(int i=(int)base.size()-1;i>=0;i--) for(int j=i-1;j>=0;j--) base[i]=min(base[i],base[i]^base[j]); } // check normalized this and r bool eq(BinaryBasis &r){ return base==r.base; } int size(){ return (int)base.size(); } }; signed main(){ int n;cin>>n; BinaryBasis bs; rep(i,n){ ll t;cin>>t; bs.add(t); } cout<<(1ll<