#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  long long n, i, w;
  cin >> n;
  vector<long long> a(n), v(n + 1);
  for (i = 0; i < n; i++) cin >> a[i];
  v[0] = 0LL;
  for (i = 1; i <= n; i++) v[i] = v[i - 1] ^ a[i - 1];
  map<long long, long long> e, o;
  w = 0LL;
  for (i = 0; i <= n; i++) {
    if (i % 2 == 0 && e.find(v[i]) != e.end())
      w += e[v[i]];
    else if (i % 2 == 1 && o.find(v[i]) != o.end())
      w += o[v[i]];
    if (i % 2 == 0)
      e[v[i]]++;
    else
      o[v[i]]++;
  }
  cout << w << "\n";
  return 0;
}
