#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
const long long INF = 1000000000;
template <class T>
T read(T &x) {
  char c;
  int flag = 1;
  while ((c = getchar()) < '0' || c > '9')
    if (c == '-') flag *= -1;
  x = c - '0';
  while ((c = getchar()) >= '0' && c <= '9') x = x * 10 + c - '0';
  x *= flag;
  return x;
}
map<long long, long long> f[2];
long long a[300005];
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long n;
  cin >> n;
  for (long long i = 1; i <= n; ++i) {
    cin >> a[i];
    a[i] ^= a[i - 1];
  }
  long long ans = 0;
  for (long long i = 1; i <= n; ++i) {
    ans += (f[1 - (i % 2)][a[i]]);
    f[i % 2][a[i - 1]]++;
  }
  cout << ans << endl;
}
