#include using namespace std; const int MAX = 32768; int main(){ int n; cin >> n; vector a(n); for(int i=0; n>i; ++i) cin >> a[i]; bool dp[n+1][MAX+1]; for(int i=0; n>=i; ++i) for(int j=0; MAX>=j; ++j) dp[i][j] = false; dp[0][0] = true; for(int i=0; n>i; ++i){ for(int j=0; MAX>=j; ++j){ if(dp[i][j] == true) dp[i+1][j^a[i]] = true; if(dp[i][j] == true) dp[i+1][j] = true; } } int ans = 0; for(int i=0; MAX>=i; ++i) ans += dp[n][i]; cout << ans << endl; /*for(int i=0; 10>i; ++i) cout << dp[n][i] << " "; cout << endl;*/ }