#include <bits/stdc++.h>
clock_t t_;
using namespace std;
template <class T>
void print(T s) {
  cout << s << "\n";
}
template <class T>
void emax(T &a, T b) {
  a = (a < b ? b : a);
};
template <class T>
void emin(T &a, T b) {
  a = (a > b ? b : a);
}
template <class T>
void printC(T s) {
  for (auto &x : s) {
    cout << x << " ";
  }
  cout << "\n";
}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
long long bucket[1 << 20][2];
int main(int argc, const char *argv[]) {
  t_ = clock();
  int n;
  cin >> n;
  vector<long long> q(n);
  for (int i = int(0); i < int(n); i++) {
    cin >> q[i];
  }
  long long act = 0;
  vector<int> arr;
  for (int i = int(0); i < int(n); i++) {
    act ^= q[i];
    bucket[act][i & 1]++;
    arr.push_back(act);
  }
  long long ans = 0;
  long long ret = 0;
  for (int i = int(0); i < int(n); i++) {
    ans += bucket[ret][1 - (i & 1)];
    ret = arr[i];
    bucket[ret][i & 1]--;
  }
  cout << ans << "\n";
  t_ = clock() - t_;
  cerr << setprecision(9) << fixed << ((float)t_ / CLOCKS_PER_SEC) << endl;
  return 0;
}
