#include <bits/stdc++.h>
using namespace std;
const int INF = 1000 * 1000 * 1000;
const long long LINF = 1LL * INF * INF;
const int MAX = 100010;
const long double PI = acos(-1.);
const double EPS = 1e-6;
long long mod = 1000LL * 1000 * 1000 + 7;
int n, v;
int cnt[104];
int a[300005];
int pr[300005];
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    if (i) pr[i] = pr[i - 1];
    pr[i] ^= a[i];
  }
  map<int, int> foo1;
  map<int, int> foo2;
  for (int i = 0; i < n; ++i) {
    if (i % 2) {
      foo1[pr[i]]++;
    } else {
      foo2[pr[i]]++;
    }
  }
  foo1[0]++;
  long long ans = 0;
  for (auto& iter : foo1) {
    ans += 1LL * (iter.second - 1) * iter.second;
  }
  for (auto& iter : foo2) {
    ans += 1LL * (iter.second - 1) * iter.second;
  }
  cout << ans / 2;
  cin >> n;
  return 0;
}
