#include <bits/stdc++.h>
using namespace std;
int n, a[1000005], pre[1000005];
long long ans;
map<int, int> h[2];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", a + i);
    pre[i] = pre[i - 1] ^ a[i];
  }
  h[0][0] = 1;
  for (int i = 1; i <= n; i++) {
    if (h[i % 2].count(pre[i])) ans += h[i % 2][pre[i]];
    h[i % 2][pre[i]]++;
  }
  printf("%lld\n", ans);
  return 0;
}
