#include <bits/stdc++.h>
using namespace std;
const long double pi = 3.1415926535897932384626433832;
const long long mod = 1e9 + 7;
complex<double> fast_exp(complex<double> a, long long b) {
  if (b == 0) return 1;
  complex<double> res = fast_exp(a, b / 2);
  res = res * res;
  if (b % 2 == 1) res = res * a;
  return res;
}
long long fastexpon(long long a, long long b, long long mod) {
  if (b == 0) return 1;
  long long res = fastexpon(a, b / 2, mod);
  res = (res * res) % mod;
  if (b % 2 == 1) res = (res * a) % mod;
  return res;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  long long a[n], b[n + 1];
  b[0] = 0;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    b[i + 1] = b[i] ^ a[i];
  }
  map<long long, pair<long long, long long>> m;
  map<long long, long long> done;
  for (long long i = 0; i <= n; i++) {
    if (i % 2 == 0)
      m[b[i]].first++;
    else
      m[b[i]].second++;
  }
  long long totalcount = 0;
  for (long long i = 0; i <= n; i++) {
    if (done[b[i]] == 0) {
      totalcount = totalcount + (m[b[i]].first) * (m[b[i]].first - 1) / 2 +
                   (m[b[i]].second) * (m[b[i]].second - 1) / 2;
      done[b[i]] = 1;
    }
  }
  cout << totalcount;
  return 0;
}
