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