#include <bits/stdc++.h>
using namespace std;
int n;
int Data[300100];
int cnt[2200100][2];
int sum[300100];
int main() {
  scanf("%d", &n);
  for (register int i = 1; i <= n; i++) scanf("%d", &Data[i]);
  for (register int i = 1; i <= n; i++) sum[i] = sum[i - 1] ^ Data[i];
  long long ans = 0;
  for (register int i = 0; i <= n; i++) {
    ans += cnt[sum[i]][i & 1];
    cnt[sum[i]][i & 1]++;
  }
  cout << ans << endl;
  return 0;
}
