#include #include #include using namespace std; int main() { const int MAX = (1 << 14) * 2; int n; cin >> n; vector a(n); for (int &ai: a) cin >> ai; vector cur(MAX + 1, 0); cur[0] = 1; for (int ai: a) { vector nxt(MAX + 1, 0); for (int i = 0; i <= MAX; i++) nxt[i] = cur[i ^ ai] | cur[i]; swap(cur, nxt); } int ans = 0; for (int i = 0; i <= MAX; i++) if (cur[i]) ans++; cout << ans << endl; return 0; }