#include <bits/stdc++.h>
using namespace std;
long long cnt[3000000][2] = {0};
int main() {
  long long n = 0, ans = 0;
  cnt[0][1] = 1;
  cin >> n;
  long long total = 0;
  for (int i = 0; i < n; i++) {
    long long x = 0;
    cin >> x;
    total ^= x;
    ans += (cnt[total][i % 2]++);
  }
  cout << ans;
  return 0;
}
