#include <bits/stdc++.h>
using namespace std;
void doit() {
  long long n, i, j, ans = 0;
  map<long long, pair<long long, long long> > mp;
  cin >> n;
  vector<long long> v(n);
  for (i = 0; i < n; i++) cin >> v[i];
  long long cumxor = 0;
  mp[0] = {0, 1};
  for (long long i = 0; i < n; i++) {
    cumxor ^= v[i];
    if (mp.find(cumxor) != mp.end()) {
      if (i & 1) {
        ans += mp[cumxor].second;
        mp[cumxor].second++;
      } else {
        ans += mp[cumxor].first;
        mp[cumxor].first++;
      }
    } else {
      mp[cumxor] = {0, 0};
      if (i & 1)
        mp[cumxor].second++;
      else
        mp[cumxor].first++;
    }
  }
  cout << ans << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t = 1;
  for (long long i = 1; i <= t; i++) {
    doit();
  }
}
