import std.stdio, std.string, std.conv;
import std.typecons;
import std.algorithm, std.array, std.range, std.container;
import std.math;

void main() {
	auto N = readln.split[0].to!int;
	auto A = readln.split.to!(int[]);
	
	int[] xor = [0];
	int[] sum = [0];
	foreach (i; 0 .. N) {
		xor ~= xor[$-1] ^ A[i], sum ~= sum[$-1] + A[i];
	}
	
	
	int ans;
	foreach (l; 1 .. N+1) foreach (r; l .. N+1) {
		ans += ( ( (xor[r] ^ xor[l-1]) == sum[r] - sum[l-1]) ? 1 : 0 );
	}
	writeln(ans);
}