# ifndef ONLINE_JUDGE # define _GLIBCXX_DEBUG # endif #include using namespace std; using ll = long long; using vi = vector; using vvi = vector>; using pii = pair; # define rep(i, n) for(int i = 0; i < (int)(n); i++) # define all(v) v.begin(), v.end() int main(){ constexpr char endl = '\n'; ios::sync_with_stdio(false); cin.tie(nullptr); cout << fixed << setprecision(10); //input(); int N;cin >> N; vi A(N); for(auto &&e : A) cin >> e; //solve(); vector dp(pow(2, 15), false); //dp[i]:=iを作れるか //元:dp[i][k]:=i番目まで見たときkを作れるか dp[0] = true; rep(i, N){ dp[A[i]] = true; } for(int &a : A){ rep(i, pow(2, 15)){ dp[i^a] = dp[i^a] | dp[i]; } } //output(); int cnt = 0; for(bool &&e : dp) if(e) ++cnt; cout << cnt << endl; }