#include "bits/stdc++.h" #define REP(i, n) for(int i = 0; i < int(n); i++) #define FOR(i,n,m) for(int i = int(n); i < int(m); i++) using namespace std; typedef long long ll; const int MOD = 1e9 + 7; const int INF = 1e9 + 6; const ll LLINF = 1e18 + 1; int main() { int n; cin >> n; vector a(n); REP(i, n) scanf("%lld", &a[i]); int cnt = 0; REP(i, n) { // 最大でも60回程度しかならないからO(NM) if (a[i] == 0) { continue; } cnt++; int x = 0; while ((1LL << (x+1)) <= a[i]) x++; //cout << i << " " << x << " " << cnt << endl; FOR(j, i+1, n) { if ((1LL << x) & a[j]) { a[j] ^= a[i]; } } } cout << (1LL << cnt) << endl; return 0; }