#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cout << name << " : " << arg1 << '\n';
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cout.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
int inf = 0x3f3f3f3f;
long long infl = 0x3f3f3f3f3f3f3f3fLL;
long double infd = 1.0 / 0.0;
const long long MOD = 1e9 + 7;
const long double pi = 2 * acos(0.0);
long long sum[1 << 20][2];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  ;
  sum[0][1] = 1;
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  long long as = 0;
  int S = 0;
  for (int i = 0; i < n; i++) {
    S ^= a[i];
    sum[S][i % 2]++;
  }
  for (int i = 0; i < 1 << 20; i++) {
    as += sum[i][0] * (sum[i][0] - 1) / 2;
    as += sum[i][1] * (sum[i][1] - 1) / 2;
  }
  cout << as;
  return 0;
}
