#include <bits/stdc++.h>
using namespace std;
long long a[300010];
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  for (long long i = 1; i <= n; ++i) cin >> a[i];
  long long tot = 0;
  map<long long, long long> mp[2];
  long long cum = 0;
  mp[0][0] = 1;
  for (long long i = 1; i <= n; ++i) {
    cum ^= a[i];
    if (mp[i % 2].find(cum) != mp[i % 2].end()) {
      tot += mp[i % 2][cum];
    }
    mp[i % 2][cum]++;
  }
  cout << tot << '\n';
}
