#include //#include #define REP(i, x, y) for (ll i = x; i <= y; i++) #define BIT(t) (1ll << (t)) #define PER(i, y, x) for (ll i = y; i >= x; i--) #define vll vector #define vvll vector> #define pll pair #define SIZE(v) ll(v.size()) #define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end()); using namespace std; //using namespace atcoder; typedef long long ll; typedef long double ld; // ios::sync_with_stdio(false); // cin.tie(nullptr); //using mint = modint; //  mint::set_mod(998244353); vll xor_basis(vll& a){ vector basis; for(ll e : a){ for(ll b : basis){ e = min(e, e ^ b); } if(e){basis.push_back(e);} } return basis; } int main(){ ll n; cin >> n; vll a; REP(i,1,n){ ll t; cin >> t; a.push_back(t); } vll b = xor_basis(a); ll ans = 1; REP(i,1,b.size()){ ans *= 2; } cout << ans << endl; }