#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1 << 20 | 5;
int cnt[MAXN][2];
int main() {
  int n, s = 0;
  scanf("%d", &n);
  ++cnt[0][0];
  for (int i = 1; i <= n; i++) {
    int t;
    scanf("%d", &t);
    s ^= t;
    ++cnt[s][i & 1];
  }
  long long res = 0;
  for (int i = 0; i < 1 << 20; i++)
    for (int j = 0; j < 2; j++)
      res += (long long)cnt[i][j] * (cnt[i][j] - 1) / 2;
  printf("%lld\n", res);
  return 0;
}
