#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j, k, l;
  cin >> n;
  int a[n + 2], b[n + 2];
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long p = 0;
  b[0] = 0;
  map<int, int> mo, me;
  for (i = 1; i <= n; i++) {
    b[i] = a[i - 1] ^ p;
    p = b[i];
    if (i % 2 == 1)
      mo[b[i]]++;
    else
      me[b[i]]++;
  }
  long long ans = 0;
  map<int, int>::iterator it;
  for (it = mo.begin(); it != mo.end(); it++) {
    p = it->second;
    ans += (p * (p - 1)) / 2;
  }
  me[0]++;
  for (it = me.begin(); it != me.end(); it++) {
    p = it->second;
    ans += (p * (p - 1)) / 2;
  }
  cout << ans << endl;
}
