#include #define REP(i, s, n) for (int i = s; i < (int)(n); i++) #define ALL(a) a.begin(), a.end() #define MOD 1000000007 using namespace std; using ll = long long; int main() { int N; cin >> N; vector A(N); REP(i, 0, N) cin >> A[i]; int rank = 0; for (int i = 60; i >= 0; i--) { REP(j, rank + 1, N) { if (A[j] & (1LL << i)) { swap(A[j], A[rank]); break; } } if (!(A[rank] & (1LL << i))) continue; REP(j, 0, N) if (j != rank && A[j] & (1LL << i)) A[j] ^= A[rank]; rank++; } cout << (1LL << rank) << endl; return 0; }