#include <bits/stdc++.h>
using namespace std;
const int MAX = 5e5 + 5;
const int INF = 0x3f3f3f3f;
long long ans = 0, n, a[MAX];
map<pair<long long, long long>, long long> mp;
void solve() {
  scanf("%lld", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%lld", &a[i]);
  }
  long long now = 0;
  mp[{0, 0}] = 1;
  for (int i = 1; i <= n; ++i) {
    now ^= a[i];
    ans += mp[{now, i % 2}]++;
  }
  printf("%lld\n", ans);
}
int main(void) {
  solve();
  return 0;
}
