#include <bits/stdc++.h>
using namespace std;
using namespace chrono;
const int infinity = (int)1e9 + 42;
const int64_t llInfinity = (int64_t)1e18 + 256;
const int module = (int)1e9 + 7;
const long double eps = 1e-8;
mt19937_64 randGen(system_clock().now().time_since_epoch().count());
inline void raiseError(const string &description) {
  cerr << "Error : " << description << endl;
  exit(42);
}
signed main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<int> v(n + 1);
  for (int i = 0; i < n; ++i) {
    cin >> v[i + 1];
  }
  for (int i = 1; i <= n; ++i) {
    v[i] ^= v[i - 1];
  }
  map<int, int> odd, even;
  int64_t ans = 0;
  for (int i = 0; i <= n; ++i) {
    ans += ((i & 1) ? odd : even)[v[i]];
    ++((i & 1) ? odd : even)[v[i]];
  }
  cout << ans << endl;
  return 0;
}
