#include<cstdio>
#define int long long
using namespace std;
const int N=1e5+7;
int n,s[N],q[N],res;
inline int calc1(int x,int y){
int t=s[x];
for(int i=x+1;i<=y;i++){
t^=s[i];
}
return t;
}
inline int calc(int x,int y){
return q[y]^q[x];
}
inline void init(){
int t=s[1];
q[1]=s[1];
for(int i=2;i<=n;i++){
q[i]=t^s[i];
t^=s[i];
}
return ;
}
signed main(){
scanf("%lld",&n);
for(int i=1;i<=n;i++){
scanf("%lld",&s[i]);
}
init();
for(int i=1;i<=n;i++){
for(int j=i;j<=n;j++){
res+=calc(i,j);
}
}
printf("%lld",res);
return 0;
}