#include <bits/stdc++.h>
using namespace std;
struct node {
  long long x, y;
} f[300300];
long long i, j, k, l, n, m, a[300300], odd, even;
long long sum;
int cmp(node p, node q) {
  if (p.x < q.x || p.x == q.x && p.y < q.y) return 1;
  return 0;
}
int main() {
  scanf("%I64d", &n);
  for (i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (i = 1; i <= n; i++) {
    f[i].x = f[i - 1].x ^ a[i];
    f[i].y = i;
  }
  sort(f + 1, f + n + 1, cmp);
  even++;
  for (i = 1; i <= n; i++)
    if (f[i].x == f[i - 1].x) {
      if (f[i].y % 2)
        odd++;
      else
        even++;
    } else {
      sum = sum + odd * (odd - 1) / 2 + even * (even - 1) / 2;
      odd = even = 0;
      if (f[i].y % 2)
        odd++;
      else
        even++;
    }
  sum = sum + odd * (odd - 1) / 2 + even * (even - 1) / 2;
  printf("%I64d\n", sum);
}
