#include "bits/stdc++.h" using namespace std; #define FOR(i,j,k) for(int (i)=(j);(i)<(int)(k);++(i)) #define rep(i,j) FOR(i,0,j) #define each(x,y) for(auto &(x):(y)) #define mp make_pair #define all(x) (x).begin(),(x).end() #define debug(x) cout<<#x<<": "<<(x)< pii; typedef vector vi; typedef vector vll; int rankMat(vector > A){ int n = (int)A.size(), m = (int)A[0].size(), r = min(n, m); for(int i = 0; i < min(n, m); ++i){ for(int j = i + 1; j < n; ++j){ if(A[j][i]){ swap(A[i], A[j]); break; } } if(A[i][i] == 0){ r--; continue; } for(int j = i + 1; j < n; ++j){ if(A[j][i]){ for(int k = i; k < m; ++k){ A[j][k] ^= A[i][k]; } } } } return r; } int main(){ const int M = 61; int N; cin >> N; vector A(N, vi(M)); rep(i, N){ int a; scanf("%d", &a); rep(j, M)if(a >> j & 1)A[i][j] = 1; } int r = rankMat(A); ll ans = 1ll << r; cout << ans << endl; }