#include <bits/stdc++.h>
using namespace std;
const long long T = 1e6 + 1e5;
long long p[400001];
long long cnt[T][2];
signed main() {
  long long n;
  cin >> n;
  for (long long i = 1; i <= n; i++) {
    long long a;
    cin >> a;
    p[i] = p[i - 1] ^ a;
  }
  long long ans = 0;
  for (long long i = 0; i <= n; i++) {
    ans += cnt[p[i]][i % 2];
    cnt[p[i]][i % 2]++;
  }
  cout << ans;
  return 0;
}
