#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* #include using namespace boost::multiprecision; */ using namespace std; using ll = long long; using ull = unsigned long long; #define REP(i,a,b) for(ll i = a; i < b; ++i) #define PRI(s) std::cout << s << endl #define PRIF(v, n) printf("%."#n"f\n", (double)v) templatevoid mins(A& a, const B& b) { a = min(a, (A)b); }; templatevoid maxs(A& a, const B& b) { a = max(a, (A)b); }; //F2^64の部分空間を基底で管理 struct xor_space { std::vector basis; bool in(uint64_t x) { for (uint64_t b : basis) if ((b ^ x) < x) x = b ^ x; return x == 0; } void add(uint64_t x) { for (uint64_t b : basis) if ((b ^ x) < x) x = b ^ x; if (x != 0) basis.push_back(x); } }; int main() { ll N; cin >> N; xor_space s; REP(i, 0, N) { ll a; cin >> a; s.add(a); } PRI((1LL << s.basis.size())); return 0; }