#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
map<long long, long long> mpo, mpe;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long n;
  cin >> n;
  vector<long long> v(n), xarr(n);
  for (int i = 0; i < n; ++i) {
    cin >> v[i];
    if (i > 0)
      xarr[i] = xarr[i - 1] ^ v[i];
    else
      xarr[i] = v[i];
  }
  mpe[0] = 1;
  for (int i = 0; i < n; ++i) {
    if (i & 1)
      mpe[xarr[i]] += 1;
    else
      mpo[xarr[i]] += 1;
  }
  long long ans = 0;
  for (auto i : mpo) {
    ans += (i.second * (i.second - 1)) / 2;
  }
  for (auto i : mpe) {
    ans += (i.second * (i.second - 1)) / 2;
  }
  cout << ans << "\n";
  return 0;
}
