#include <bits/stdc++.h>
using namespace std;
const int mx = 300000;
int n, t[mx];
unordered_map<int, int> xormap[2];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &t[i]);
  long long int result = 0;
  int currXor = 0;
  xormap[0][0]++;
  for (int i = 0; i < n; i++) {
    currXor ^= t[i];
    if (xormap[(i + 1) & 1].find(currXor) != xormap[(i + 1) & 1].end()) {
      result += (long long int)xormap[(i + 1) & 1][currXor];
    }
    xormap[(i + 1) & 1][currXor]++;
  }
  printf("%lld\n", result);
}
