#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 3e5 + 10, MAX_V = 1048576 + 10;
int px[MAX_N], cnt[MAX_V][2];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  px[0] = 0;
  for (int i = 0; i < n; ++i) {
    cin >> px[i + 1];
    px[i + 1] ^= px[i];
  }
  int64_t ans = 0;
  cnt[0][0] = 1;
  for (int i = 1; i <= n; ++i) {
    ans += cnt[px[i]][i % 2];
    cnt[px[i]][i % 2]++;
  }
  cout << ans << "\n";
  return 0;
}
