#include <bits/stdc++.h>
using namespace std;
template <class T>
void print(const T niz[], const int siz) {
  for (int i = 0; i < siz; i++) cout << niz[i] << " ";
  cout << endl;
}
int ks[2000005][3];
int n;
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  int ksor = 0;
  long long res = 0;
  ks[0][0] = 1;
  for (int(i) = (0); (i) <= (n - 1); ++(i)) {
    int a;
    cin >> a;
    ksor ^= a;
    if ((i + 1) % 2 == 0) {
      res += ks[ksor][0];
    } else
      res += ks[ksor][1];
    ks[ksor][(i + 1) % 2]++;
  }
  cout << res;
  return 0;
}
