#include <bits/stdc++.h>
using namespace std;
const int maxn = 3e5 + 5;
const int maxa = (1 << 20) + 5;
int a[maxn], x = 0, n;
long long ans = 0;
int c[maxa][2];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  c[0][0] = 1;
  for (int i = 1; i <= n; i++) {
    x ^= a[i];
    ans += c[x][i % 2];
    c[x][i % 2]++;
  }
  printf("%lld\n", ans);
  return 0;
}
