#include using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); int n, ans = 0, c; unsigned long long tmp; cin >> n; vector a(n); for(int i = 0; i < n; i++) { cin >> a[i]; } for(int i = 0; i < n; i++) { if(a[i]) { ans++; tmp = a[i]; c = -1; while (tmp){ c++; tmp >>= 1LL; } for(int j = i + 1; j < n; j++) { if ((1LL << c) & a[j]) a[j] ^= a[i]; } } } cout << (1LL << ans) << "\n"; return 0; }