#include <bits/stdc++.h>
using namespace std;
long long n;
long long ans;
map<pair<long long, long long>, long long> ps;
vector<long long> v;
vector<long long> pref;
void info(vector<long long>& v) {
  for (auto el : v) {
    cout << el << " ";
  }
  cout << endl;
}
void start() {
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
}
signed main() {
  start();
  cin >> n;
  v.resize(n + 1);
  pref.resize(n + 1);
  for (long long i = 1; i <= n; ++i) cin >> v[i];
  pref[1] = v[1];
  for (long long i = 2; i <= n; ++i) pref[i] = pref[i - 1] ^ v[i];
  for (long long i = 1; i <= n; ++i) {
    ans += ps[{pref[i], i % 2}];
    ++ps[{pref[i], i % 2}];
    ans += (long long)(pref[i] == 0 && i % 2 == 0);
  }
  cout << ans << endl;
}
