#include #include #include #include int main() { int switches; std::cin >> switches; std::set s; for (int i = 0; i < switches;i++){ int num; std::cin >> num; s.insert(num); } const int max = 1 << 15; bool ans[max] = {false}; ans[0] = true; for (std::set::iterator it = s.begin(); it != s.end(); ++it) { for (int j = 0; j < max; j++) { if(ans[j]) ans[j ^ *it] = true; } } int a = 0; for (int i = 0; i < max; i++) { a += ans[i]; } std::cout << a << std::endl; return 0; }