#include <bits/stdc++.h>
using namespace std;
unordered_map<long long, long long> mp[2];
const long long size = 3e5 + 5;
long long arr[size];
long long d[size];
int32_t main() {
  long long n;
  cin >> n;
  for (long long i = 1; i <= n; i++) cin >> arr[i];
  d[0] = 0;
  for (long long i = 1; i <= n; i++) d[i] = d[i - 1] ^ arr[i];
  long long ans = 0;
  long long t;
  for (long long i = 0; i <= n; i++) {
    t = (i % 2);
    if (mp[t].count(d[i])) ans += mp[t][d[i]];
    if (mp[t].count(d[i]))
      mp[t][d[i]]++;
    else
      mp[t][d[i]] = 1;
  }
  cout << ans << endl;
}
