#include <bits/stdc++.h>
using namespace std;
const int maxn = 3e5 + 5;
struct node {
  int num, pos;
} pre[maxn];
long long ans;
int now, n, c, odd, eve;
bool cmp(node a, node b) { return a.num < b.num; }
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &c);
    pre[i].num = pre[i - 1].num xor c;
    pre[i].pos = i;
  }
  sort(pre + 1, pre + n + 1, cmp);
  now = -1;
  for (int i = 0; i <= n; i++) {
    if (now != pre[i].num) {
      now = pre[i].num;
      ans += 1ll * odd * (odd - 1) / 2 + 1ll * eve * (eve - 1) / 2;
      odd = 0;
      eve = 0;
    }
    if (pre[i].pos % 2)
      eve++;
    else
      odd++;
  }
  ans += 1ll * odd * (odd - 1) / 2 + 1ll * eve * (eve - 1) / 2;
  printf("%I64d\n", ans);
  return 0;
}
