#include using namespace std; using ll = long long; #define rep(i, s, e) for (int i = (int)s; i < (int)e; ++i) #define all(a) (a).begin(), (a).end() int main() { cin.tie(nullptr); int N; cin >> N; vector A(N); rep(i, 0, N) cin >> A[i]; vector dp(N, vector(1 << 15, false)); dp[0][0] = true; dp[0][A[0]] = true; rep(i, 0, N - 1) { rep(j, 0, 1 << 15) { if (!dp[i][j]) continue; dp[i + 1][j] = true; dp[i + 1][j ^ A[i + 1]] = true; } } int ans = 0; rep(i, 0, 1 << 15) if (dp[N - 1][i]) ans++; cout << ans << '\n'; }