#include <bits/stdc++.h>
using namespace std;
const long long N = 3e5 + 5, M = (1 << 20) + 5;
long long a[N], prefx[N], cnt[3][M];
int32_t main() {
  ios_base::sync_with_stdio(false);
  long long n;
  cin >> n;
  for (long long i = 0; i < n; ++i) {
    cin >> a[i];
  }
  cnt[1][0] = 1;
  long long Xor = 0, res = 0;
  for (long long i = 0; i < n; ++i) {
    Xor ^= a[i];
    res += cnt[i % 2][Xor];
    ++cnt[i % 2][Xor];
  }
  cout << res;
}
