#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int64_t n;
  cin >> n;
  vector<int64_t> v(n + 1);
  for (int64_t i = 1; i <= n; ++i) {
    cin >> v[i];
    if (i > 0) v[i] ^= v[i - 1];
  }
  map<int64_t, vector<int64_t>> occ;
  for (int64_t i = 0; i <= n; ++i) occ[v[i]].emplace_back(i);
  int64_t ans = 0;
  for (auto i : occ) {
    int64_t odd = 0, even = 0;
    for (int64_t j = 0; j < i.second.size(); ++j) {
      if (i.second[j] % 2 == 0)
        even++;
      else
        odd++;
    }
    ans += odd * (odd - 1) / 2;
    ans += even * (even - 1) / 2;
  }
  cout << ans << '\n';
  return 0;
}
