#include <bits/stdc++.h>
using namespace std;
const long long int MAX = 1e7;
long long int cnt[MAX + 1][2];
void solve() {
  long long int n;
  cin >> n;
  vector<long long int> v(n + 1);
  for (long long int j = 1; j <= n; j++) cin >> v[j];
  long long int curr = 0;
  long long int res = 0;
  cnt[0][0]++;
  for (long long int j = 1; j <= n; j++) {
    curr ^= v[j];
    res += cnt[curr][j % 2];
    cnt[curr][j % 2]++;
  }
  cout << res << '\n';
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t;
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
