#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const int N = 300005;
long long int a[N], pref[N];
map<int, int> cnt[2];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int n;
  cin >> n;
  int x = 0;
  cnt[0][0] = 1;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    x ^= a[i];
    if (cnt[i % 2].find(x) != cnt[i % 2].end()) {
      cnt[i % 2][x]++;
    } else {
      cnt[i % 2][x] = 1;
    }
  }
  long long int ans = 0;
  for (int i = 0; i <= 1; ++i) {
    map<int, int>::iterator it;
    for (it = cnt[i].begin(); it != cnt[i].end(); it++) {
      int y = it->second;
      ans += 1LL * y * (y - 1) / 2;
    }
  }
  cout << ans;
  return 0;
}
