#include<stdio.h>
#include<string.h>
int num[10005],k,n;
#define PI 3.1415926
#define ll long long
ll a[300000];
ll b[300000];
int main()
{
	int n;
	int k;
	scanf("%d", &n);
	for (int i = 0; i < n; i++)
	{
		scanf("%d", &k);
		a[i + 1] = a[i] + k;
		b[i + 1] = b[i] ^ k;
	}
	int cnt = 0;
	for (int i = 0; i < n; i++)
	{
		for (int j = i + 1; j <= n; j++)
		{
			if (a[j] - a[i] == (b[j] ^ b[i]))
			{
				cnt++;
			}
		}
	}
	printf("%d\n", cnt);
	return 0;
}