#include <bits/stdc++.h>
using namespace std;
template <typename A>
bool uin(A &a, A b) {
  return a > b ? (a = b, true) : false;
}
template <typename A>
bool uax(A &a, A b) {
  return a < b ? (a = b, true) : false;
}
signed solve();
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long tests = 1;
  while (tests--) solve();
  return 0;
}
const long long MAX_A = 1e7 + 5;
long long xor1[MAX_A], xor2[MAX_A];
signed solve() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (auto &x : a) {
    cin >> x;
  }
  xor1[0] = 1;
  long long ans = 0;
  long long cur = 0;
  for (long long i = 0; i < n; ++i) {
    cur ^= a[i];
    if (i % 2 == 1) {
      ans += xor1[cur];
      xor1[cur]++;
    } else {
      ans += xor2[cur];
      xor2[cur]++;
    }
  }
  cout << ans << '\n';
  return 0;
}
