#include <bits/stdc++.h>
using namespace std;
long long t, n, m, x, y, z, w;
int main() {
  long long ans = 0, xo = 0;
  cin >> n;
  map<pair<long long, long long>, long long> mpp;
  mpp[make_pair(0, 0)]++;
  for (long long i = 1; i <= n; i++) {
    cin >> x;
    xo = xo ^ x;
    ans += mpp[make_pair(xo, i % 2)];
    mpp[make_pair(xo, i % 2)]++;
  }
  cout << ans;
  return 0;
}
