#include <bits/stdc++.h>
using namespace std;
priority_queue<pair<int, int>, vector<pair<int, int> >,
               greater<pair<int, int> > >
    pq;
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long int binpow(long long int n, long long int x) {
  long long int ans = 1;
  while (x) {
    if (x & 1) ans *= n;
    n *= n;
    x >>= 1;
  }
  return ans;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  vector<int> arr(n + 1);
  vector<long long int> pre(n + 1, 0);
  map<long long int, int> o_map, e_map;
  e_map[0] = 1;
  long long int ans = 0;
  for (int i = 1; i <= n; ++i) {
    cin >> arr[i];
    pre[i] = pre[i - 1] ^ arr[i];
    if (i % 2) {
      ans += o_map[pre[i]];
      o_map[pre[i]]++;
    } else {
      ans += e_map[pre[i]];
      e_map[pre[i]]++;
    }
  }
  cout << ans << "\n";
  return 0;
}
