#include <bits/stdc++.h>
const int MAXN = 301000;
const int MAXX = 1 << 20;
int n;
int arr[MAXN];
int sum[MAXN];
long long count[MAXX][2];
int main() {
  std::scanf("%d", &n);
  for (int i = 0; i < n; ++i) std::scanf("%d", &arr[i]);
  sum[0] = 0;
  for (int i = 0; i < n; ++i) sum[i + 1] = sum[i] ^ arr[i];
  long long ans = 0;
  for (int i = 0; i <= n; ++i) {
    int x = sum[i];
    ans += count[x][i & 1];
    ++count[x][i & 1];
  }
  std::printf("%lld\n", ans);
}
