#include #include using lint = long long; void solve() { int n; std::cin >> n; std::vector xs(n); for (auto& x : xs) std::cin >> x; int ans = 0; for (int i = n - 1; i >= 0; --i) { if (xs[i] == 0) continue; ++ans; for (int j = 0; j < i; ++j) { xs[j] = std::min(xs[j], xs[j] ^ xs[i]); } } std::cout << (1LL << ans) << std::endl; } int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); solve(); return 0; }