#include using namespace std; #ifdef LOCAL #include "settings/debug.cpp" #else #define Debug(...) void(0) #endif #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; int main() { cin.tie(nullptr)->sync_with_stdio(false); int n; cin >> n; vector a(n); rep(i, n) cin >> a[i]; vector dp(n + 1, vector(1 << 15, false)); dp[0][0] = true; rep(i, n) { rep(bit, 1 << 15) { if (dp[i][bit]) { dp[i + 1][bit] = true; dp[i + 1][bit ^ a[i]] = true; } } } int ans = 0; rep(i, 1 << 15) ans += dp[n][i]; cout << ans << '\n'; return 0; }