#include #include using namespace std; typedef long long LL; const int N = 100010, B = 70; LL a[N]; int n, rnk; struct LinearBasis { LL v[B]; void Insert(LL x) { for (int i = B - 1; i >= 0; --i) { if (x >> i & 1) { if (v[i]) { x ^= v[i]; } else { v[i] = x; ++rnk; return; } } } } }; LinearBasis lb; int main() { // freopen("int.in", "r", stdin); // freopen("int.out", "w", stdout); scanf("%d", &n); for (int i = 1; i <= n; ++i) { scanf("%lld", &a[i]); lb.Insert(a[i]); } printf("%lld\n", 1LL << rnk); return 0; }