#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pi pair<int,int>
#define f first
#define s second
#define mp make_pair
map<pi,int>M;
int a[100];
ll ans=0;
int N;
    
int rec(int i,ll xr){
    if(i==N+1 and xr==0){    
        return 1;
    }
    if(i==N+1) return 0;
    if(M.find(mp(i,xr))!=M.end()) return M[mp(i,xr)];
    ll d=0;
    ll ret=0;
    for(int j=i;j<=N;j++){
        d+=a[j];
        ret+=rec(j+1,xr^d);
    }
    M[mp(i,xr)]=ret;
    return ret;
}
int main() {
    /* Enter your code here. Read input from STDIN. Print output to STDOUT */   
    cin >> N;
    for(int i=1;i<N+1;i++){
        cin >> a[i];
    }
    cout<<rec(1,0);
    //cout<<ans;
    return 0;
}