#include <bits/stdc++.h>
const int N = 500003;
inline void read(int &first) {
  first = 0;
  int f = 1;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    first = first * 10 + c - '0';
    c = getchar();
  }
  first *= f;
}
using namespace std;
int n, a[N], sum;
int num[1 << 20][2];
int main() {
  read(n);
  for (int i = 1; i <= n; ++i) read(a[i]);
  for (int i = 1; i <= n; ++i) a[i] ^= a[i - 1];
  long long ans = 0;
  ++num[0][0];
  for (int i = 1; i <= n; ++i) {
    ans += num[a[i]][i & 1];
    ++num[a[i]][i & 1];
  }
  printf("%lld\n", ans);
}
