#include <bits/stdc++.h>
using namespace std;
long long fun(vector<int>& v) {
  long long i, a = 0, n = v.size(), s;
  for (i = 0; i < n; i++) {
    if (v[i] % 2 == 0) a++;
  }
  s = a * (a - 1) / 2 + (n - a) * (n - a - 1) / 2;
  return s;
}
int main() {
  int n, i;
  cin >> n;
  long long a[n], c = 0, x;
  for (i = 0; i < n; i++) cin >> a[i];
  long long b[n + 1];
  b[0] = 0;
  unordered_map<int, vector<int>> m;
  m[0].push_back(0);
  for (i = 1; i <= n; i++) {
    b[i] = b[i - 1] ^ a[i - 1];
    m[b[i]].push_back(i);
  }
  for (auto it = m.begin(); it != m.end(); it++) {
    x = fun(it->second);
    c += x;
  }
  cout << c;
}
