#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 5;
int n, a[N];
int x[N];
long long sum;
int main() {
  map<pair<int, int>, int> cnt;
  scanf("%d", &n);
  cnt[{0, 0}]++;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    x[i] = x[i - 1] ^ a[i];
    cnt[{x[i], i % 2}]++;
  }
  for (auto& x : cnt) {
    sum += (long long)(x.second) * (long long)(x.second - 1) / 2;
  }
  printf("%lld\n", sum);
  return 0;
}
