#include int main() { int switches; std::cin >> switches; const int max = 1 << 15; bool ans[max] = {true}; for (int i = 0; i < switches; i++) { int n; std::cin >> n; if(!ans[n]){ for (int j = 0; j < max; j++) { if(ans[j]) ans[j ^ n] = true; } } } int a = 0; for (int i = 0; i < max; i++) { a += ans[i]; } std::cout << a << std::endl; return 0; }