#include "bits/stdc++.h" using namespace std; int main() { int N; cin >> N; vector A(N); int X=0; set s; for (int i = 0; i < N; i++) { cin >> A[i]; X = X^A[i]; //cout << (0^A[i]) << endl; //cout << X << endl; s.insert(0^A[i]); s.insert(X^A[i]); } cout << s.size() << endl; }