#include <bits/stdc++.h>
using namespace std;
void read(int& x) { scanf("%d", &x); }
void read(long long& x) { scanf("%lld", &x); }
void read(pair<int, int>& x) { scanf("%d%d", &x.first, &x.second); }
void read(pair<long long, long long>& x) {
  scanf("%lld%lld", &x.first, &x.second);
}
template <typename T, typename... Args>
void read(T& a, Args&... b) {
  read(a);
  read(b...);
}
void cppio() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
}
int n;
int a[300010];
int main() {
  cppio();
  cin >> n;
  map<int, int> m[2];
  m[0][0] = 1;
  long long ans = 0;
  for (int i = 1; i <= (n); ++i) {
    cin >> a[i];
    a[i] ^= a[i - 1];
    ans += m[i & 1][a[i]]++;
  }
  cout << ans << endl;
  return 0;
}
