#include <bits/stdc++.h>
using namespace std;
int n;
long long a[300005];
long long sum[300005];
map<long long, vector<int> > mp1;
map<long long, vector<int> > mp2;
int main() {
  scanf("%d", &n);
  long long ans = 0;
  for (int i = 0; i < n; i++) scanf("%I64d", &a[i]);
  long long tmp = 0;
  for (int i = 0; i < n; i++) {
    tmp = (tmp ^ a[i]);
    sum[i] = tmp;
  }
  tmp = 0;
  for (int i = 0; i < n; i += 2) {
    tmp = sum[i];
    ans += mp1[tmp].size();
    mp1[tmp].push_back(i);
  }
  mp2[0].push_back(-1);
  for (int i = 1; i < n; i += 2) {
    tmp = sum[i];
    ans += mp2[tmp].size();
    mp2[tmp].push_back(i);
  }
  cout << ans << endl;
  return 0;
}
