#include <bits/stdc++.h>
using namespace std;
const int M = 3e5 + 5;
const int MB = 1 << 20;
int a[M];
int cnt1[MB], cnt2[MB];
int main() {
  int n;
  scanf("%d", &n);
  cnt2[0] = 1;
  int now = 0;
  long long ans = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    now ^= a[i];
    if (i & 1) {
      ans += cnt1[now];
      cnt1[now]++;
    } else {
      ans += cnt2[now];
      cnt2[now]++;
    }
  }
  printf("%lld\n", ans);
  return 0;
}
