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