#include "bits/stdc++.h" using namespace std; int main() { int N; cin >> N; vector A(N); for (int i = 0; i < N; i++) { cin >> A[i]; } int ans = 0; vector> matrix(N, vector(61)); for (int i = 0; i < N; i++) { for (int j = 0; j < 61; j++) { matrix[i][j] = (A[i] >> j) % 2; } } vector check(N, 0); for (int j = 0; j < 61; j++) { int start = -1; for (int i = 0; i < N; i++) { if (check[i]) continue; if (matrix[i][j] == 1){ start = i; break; } } //cout << j << endl; if (start == -1) continue; ans++; check[start] = 1; for (int i = 0; i < N; i++) { if (check[i]) continue; if (matrix[i][j]){ for (int k = j; k < 61; k++) { matrix[i][k] ^= matrix[start][k]; } } } } cout << (1ll << ans) << endl; }