#include using namespace std; constexpr int MAXN = 32768; int main() { int n; bool b[MAXN] = {0}; b[0] = true; cin >> n; int a; for(int i = 0; i != n; ++i){ cin >> a; for(int j = 0; j != MAXN; ++j) if(b[j]) b[j ^ a] = true; } int result = 0; for(int j = 0; j != MAXN; ++j) result += b[j]; cout << result << endl; return 0; }