#include <bits/stdc++.h>
using namespace std;
const int MAXN = 3e5;
int n, pxor[MAXN + 10];
long long ans;
map<int, int> odd, even;
int main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(false);
  int i, j;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    scanf("%d", &pxor[i]);
    pxor[i] ^= pxor[i - 1];
  }
  for (i = 0; i <= n; i++) {
    if (i % 2)
      odd[pxor[i]]++;
    else
      even[pxor[i]]++;
  }
  map<int, int>::iterator it;
  for (it = even.begin(); it != even.end(); it++)
    ans += (long long)(it->second) * (it->second - 1) / 2;
  for (it = odd.begin(); it != odd.end(); it++)
    ans += (long long)(it->second) * (it->second - 1) / 2;
  printf("%lld", ans);
  return 0;
}
