#include <bits/stdc++.h>
using namespace std;
long long n, a[400000], Xor[400000];
long long cnt[2][1 << 20];
long long ans = 0;
signed main() {
  cin >> n;
  for (long long i = 1; i <= n; i++) cin >> a[i];
  for (long long i = 1; i <= n; i++) {
    Xor[i] = Xor[i - 1] ^ a[i];
  }
  cnt[0][0] = 1;
  for (long long i = 1; i <= n; i++) {
    ans += cnt[(i) % 2][Xor[i]];
    cnt[(i) % 2][Xor[i]]++;
  }
  cout << ans;
}
