#include using namespace std; #define rep(i,n) for(int i = 0; i < (n);i++) #define sz(x) int(x.size()) typedef long long ll; typedef pair P; const int m = 16385; int dp[m]; int main(){ int n; cin >> n; vector a(n); rep(i,n) cin >> a[i]; dp[0] = 1; rep(i,n){ rep(j,m){ dp[j ^ a[i]] = dp[j]; } } int res = 0; rep(i,m) res += dp[i]; cout << res << endl; return 0; }