#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 300050;
const long long LINF = 0x3f3f3f3f3f3f3f3f;
map<int, int> odd, even;
int buf[MAXN], pre[MAXN];
int main() {
  ios::sync_with_stdio(false);
  long long n;
  cin >> n;
  for (long long i = 1; i <= n; i++) {
    cin >> buf[i];
    pre[i] = pre[i - 1] ^ buf[i];
  }
  long long res = 0;
  even[0]++;
  for (int i = 1; i <= n; i++) {
    if (i % 2 == 1) {
      res += odd[pre[i]];
      odd[pre[i]]++;
    } else {
      res += even[pre[i]];
      even[pre[i]]++;
    }
  }
  cout << res << endl;
}
