#include<bits/stdc++.h>
using namespace std;

const int maxn = 2 * 1e5 + 1;

int n, num[maxn] = {}, pl[maxn] = {}, xo[maxn] = {};

int main()
{
	cin >> n;
 	for (int i = 1; i <= n; i++)
 	{
 		cin >> num[i];
 		pl[i] = xo[i] = num[i];
 		pl[i] += pl[i - 1];
 		xo[i] ^= xo[i - 1];
	}
	
	int ans = 0;
	for (int i = 1; i <= n; i++)
		for (int j = i; j <= n; j++)
			if (pl[j] - pl[i - 1] == (xo[j] ^ xo[i - 1]))
				ans++;
		
	cout << ans << '\n';
	return 0;
}