#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  vector<long long> d;
  d.resize(n + 1);
  long long a, ans = 0;
  map<long long, pair<long long, long long> > mp;
  mp[0].first = 1;
  for (long long i = 1; i <= n; i++) {
    cin >> a;
    if (i == 1)
      d[i] = a;
    else
      d[i] = d[i - 1] ^ a;
    if (i % 2 == 0) {
      ans += mp[d[i]].first;
      mp[d[i]].first++;
    } else {
      ans += mp[d[i]].second;
      mp[d[i]].second++;
    }
  }
  cout << ans;
  return 0;
}
