#include <bits/stdc++.h>
using namespace std;
const int maxn = 3e5 + 10;
long long a[maxn], n, ans;
int cnt[2][(1 << 20) + 3];
long long modx(long long base, long long ex) {
  long long ans = 1LL, val = base;
  while (ex > 0LL) {
    if (ex & 1LL) ans = (ans * val) % 1000000007LL;
    val = (val * val) % 1000000007LL;
    ex = ex >> 1LL;
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  int pre = 0;
  cnt[0][0] = 1;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    pre = pre ^ a[i];
    ans += cnt[(i) % 2][pre];
    cnt[i % 2][pre]++;
  }
  cout << ans << endl;
  return 0;
}
