//Name: //Level: //Category: //Note: /** * */ #include #include using namespace std; bool solve(bool first) { int N; if(!(cin >> N)) return false; unordered_set res, buf; res.insert(0); for(int i = 0; i < N; ++i) { int a; cin >> a; buf.clear(); for(const int n : res) { buf.insert(a ^ n); } res.insert(buf.begin(), buf.end()); } cout << res.size() << endl; return true; } int main() { cin.tie(0); ios::sync_with_stdio(0); cout.setf(ios::fixed); cout.precision(10); bool first = true; while(solve(first)) { first = false; } return 0; }