#include <bits/stdc++.h>
using namespace std;
vector<vector<long long> > cnt(2, vector<long long>(1100000, 0));
int main() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i];
  }
  vector<int> prefXor = v;
  for (int i = 1; i < n; i++) {
    prefXor[i] ^= prefXor[i - 1];
  }
  for (int i = 0; i < n; i++) {
    cnt[(i + 1) % 2][prefXor[i]]++;
  }
  long long sol = cnt[0][0];
  for (int i = 0; i < 1100000; i++) {
    sol +=
        (cnt[0][i] * (cnt[0][i] - 1)) / 2 + (cnt[1][i] * (cnt[1][i] - 1)) / 2;
  }
  cout << sol;
  return 0;
}
