//Name: //Level: //Category: //Note: /** * */ #include #include using namespace std; bool solve(bool first) { int N; if(!(cin >> N)) return false; bitset<1<<15> table; table[0] = 1; for(int i = 0; i < N; ++i) { int a; cin >> a; for(int j = 0; j < (1<<15); ++j) { if(table[j]) table[a^j] = 1; } } cout << table.count() << 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; }