#include "bits/stdc++.h" using namespace std; #define MAX 35000 bool now[MAX]; bool nex[MAX]; int main() { int N; cin >> N; vector A(N); for (int i = 0; i < N; i++) { cin >> A[i]; } int ans = 0; now[0] = true; for (int i = 0; i < N; i++) { for (int j = 0; j < MAX; j++) { nex[j] |= now[j ^ A[i]]; } for (int j = 0; j < MAX; j++) { now[j] |= nex[j]; } } for (int i = 0; i < MAX; i++) { if (now[i]) ans++; } cout << ans << endl; //cout << (1ll << ans) << endl; }