#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  int n;
  cin >> n;
  vector<int> v(n + 1);
  v[0] = 0;
  for (int i = 0; i < n; i++) {
    cin >> v[i + 1];
    v[i + 1] ^= v[i];
  }
  int N = (1 << 20);
  vector<pair<int, int> > ar(N, {0, 0});
  for (int i = 0; i <= n; i++) {
    if (i & 1)
      ar[v[i]].second++;
    else
      ar[v[i]].first++;
  }
  long long res = 0;
  for (int i = 0; i < N; i++)
    res += (1LL * ar[i].first * (ar[i].first - 1)) +
           (1LL * ar[i].second * (ar[i].second - 1));
  cout << (res >> 1LL) << endl;
  return 0;
}
