#include <bits/stdc++.h>
using namespace std;
int n;
int inp[300000];
map<int, int> odd_lst, even_lst;
int main() {
  int i, j, k;
  long long cnt = 0LL;
  scanf("%d", &n);
  for (i = 0; i < n; i++) scanf("%d", &inp[i]);
  map<int, int>::iterator it;
  j = 0;
  odd_lst[0] = 1;
  for (i = 0; i < n; i++) {
    j ^= inp[i];
    if (i % 2) {
      it = odd_lst.find(j);
      if (it != odd_lst.end())
        cnt += (long long)(it->second++);
      else
        odd_lst[j] = 1;
    } else {
      it = even_lst.find(j);
      if (it != even_lst.end())
        cnt += it->second++;
      else
        even_lst[j] = 1;
    }
  }
  printf("%I64d\n", cnt);
  return 0;
}
