#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 5;
int a[N];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  map<long long, long long> odd, even;
  long long cur = 0;
  even[0]++;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    cur ^= a[i];
    if (i & 1)
      odd[cur]++;
    else
      even[cur]++;
  }
  long long ans = 0;
  for (auto it : odd) {
    long long t = it.second;
    ans += t * (t - 1) / 2;
  }
  for (auto it : even) {
    long long t = it.second;
    ans += t * (t - 1) / 2;
  }
  cout << ans << endl;
  return 0;
}
