#include <bits/stdc++.h>
using namespace std;
long long begtime = clock();
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cout << name << " : " << arg1 << '\n';
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cout.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
void splitx(string s, char c, vector<string>& v) {
  long long i = 0, j;
  while (i < (long long)(s).size()) {
    j = i;
    string temp;
    while (j < (long long)(s).size() && s[j] != c) {
      temp += s[j];
      j++;
    }
    v.push_back(temp);
    i = j + 1;
  }
}
vector<long long> dx{1, 0, -1, 0, 1, 1, -1, -1};
vector<long long> dy{0, 1, 0, -1, 1, -1, 1, -1};
signed main() {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  vector<long long> v(n);
  for (long long i = 0; i < n; i++) {
    cin >> v[i];
  }
  long long val = 0;
  map<long long, long long> mpe;
  map<long long, long long> mpo;
  mpe[0] = 1;
  for (long long i = 0; i < n; i++) {
    val ^= v[i];
    if (i % 2 == 0) {
      if (((mpo).find(val) != (mpo).end())) {
        mpo[val]++;
      } else {
        mpo[val] = 1;
      }
    } else {
      if (((mpe).find(val) != (mpe).end())) {
        mpe[val]++;
      } else {
        mpe[val] = 1;
      }
    }
  }
  long long ans = 0;
  for (auto& it : mpe) {
    ans += it.second * (it.second - 1) / 2;
  }
  for (auto& it : mpo) {
    ans += it.second * (it.second - 1) / 2;
  }
  cout << ans << '\n';
  return 0;
}
