#include #include #include #include #include #include #include #include #include static const int MOD = 1000000007; using ll = long long; using u32 = unsigned; using namespace std; template constexpr T INF = ::numeric_limits::max() / 32 * 15 + 208; int gauss_jordan(vector a){ int n = a.size(), m = 64; int cnt = 0; for (int i = 0; i < m && cnt != n; ++i) { int p = cnt; for (int j = cnt; j < n; ++j) { if(a[j] & (1LL << i)){ p = j; break; } } if((a[p] & (1LL << i)) == 0) continue; swap(a[cnt], a[p]); for (int j = 0; j < n; ++j) { if(cnt == j) continue; if(a[j] & (1LL << i)) a[j] ^= a[cnt]; } cnt++; } return cnt; } int main() { int n; cin >> n; vector v(n); for (auto &&i : v) scanf("%lld", &i); cout << (1LL << (gauss_jordan(v))) << "\n"; return 0; }