#include using namespace std; using ll = long long; #define rep(i,m,n) for(int i=m; i> N; vector A(N); for(int &a : A) cin >> a; const int MAX = (1 << 15); vector> dp(N+1, vector(MAX, false)); dp[0][0] = true; rep(i, 0, N) rep(j, 0, MAX){ if(dp[i][j]){ dp[i+1][j] = true; dp[i+1][j ^ A[i]] = true; } } int ans = 0; rep(j, 0, MAX) if(dp[N][j]) ans++; cout << ans << endl; return 0; }