#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0, w = 0;
  char ch = getchar();
  while (!isdigit(ch)) w |= ch == '-', ch = getchar();
  while (isdigit(ch)) x = (x << 1) + (x << 3) + ch - '0', ch = getchar();
  return w ? -x : x;
}
long long ans, n, a[4000000], sum[4000000], t[2][4000000];
signed main() {
  n = read();
  for (long long i = 1; i <= n; ++i) a[i] = read(), sum[i] = sum[i - 1] ^ a[i];
  t[0][0] = 1;
  for (long long i = 1; i <= n; ++i) {
    ans += t[i & 1][sum[i]];
    ++t[i & 1][sum[i]];
  }
  cout << ans << endl;
  return 0;
}
