#include using namespace std; long long bs[65]; int main() { ios::sync_with_stdio(0); cin.tie(0); int n; cin >> n; int r = 0; for (int i = 0; i < n; i++) { long long x; cin >> x; for (int j = 60; j >= 0; j--) { if (!(x >> j)) continue; if (!bs[j]) { bs[j] = x; r++; break; } x ^= bs[j]; } } cout << (1LL << r) << "\n"; return 0; }