#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#define SF scanf
#define PF printf
#define REP(i,a,b) for(int i = (a);i <= (b);i++)
#define N 200100
int n,sum[N],x[N];
using namespace std;
int ans = 0;
int main()
{
	x[0] = sum[0] = 0;
	cin>>n;
	REP(i,1,n){
		int t;
		SF("%d",&t);
		sum[i] = sum[i - 1] + t;
		x[i] = x[i - 1] ^ t;
	}
	REP(i,1,n){
		REP(j,i,n){
			int xx = x[j] ^ x[i - 1];
			int ss = sum[j] - sum[i - 1];
			if(xx == ss){
				ans++;	
			}
			else if(xx < ss)break;
		}
	}
	cout<<ans;
	return 0;
}