#include <bits/stdc++.h>
using namespace std;
using ll = long long;
bool operator<(pair<int, int> a, pair<int, int> b) { return a.first < b.first; }
int main() {
  int n, a;
  cin >> n;
  vector<pair<int, int> > v;
  cin >> a;
  int cnt = a;
  v.push_back({a, 1});
  for (int i = 2; i <= n; i++) {
    cin >> a;
    cnt = cnt ^ a;
    v.push_back({cnt, i});
  }
  sort(v.begin(), v.end());
  ll prev, cnt1 = 0, cnt2 = 0;
  ll ans = 0;
  prev = 0;
  cnt1++;
  for (auto x : v) {
    if (x.first == prev) {
      if (x.second % 2 == 0) {
        cnt1++;
      } else {
        cnt2++;
      }
    } else {
      ans = ans + cnt1 * (cnt1 - 1) / 2 + cnt2 * (cnt2 - 1) / 2;
      cnt1 = 0;
      cnt2 = 0;
      if (x.second % 2 == 0) {
        cnt1++;
      } else {
        cnt2++;
      }
    }
    prev = x.first;
  }
  ans += cnt1 * (cnt1 - 1) / 2 + cnt2 * (cnt2 - 1) / 2;
  cout << ans;
  return 0;
}
