#include <bits/stdc++.h>
using namespace std;
const int prime = 999983;
const int INF = 0x7FFFFFFF;
const long long INFF = 0x7FFFFFFFFFFFFFFF;
const double pi = acos(-1.0);
const double inf = 1e18;
const double eps = 1e-6;
const long long mod = 1e9 + 7;
long long qpow(long long a, long long b) {
  long long s = 1;
  while (b > 0) {
    if (b & 1) s = s * a % mod;
    a = a * a % mod;
    b >>= 1;
  }
  return s;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
int dr[2][4] = {1, -1, 0, 0, 0, 0, -1, 1};
const int maxm = 2e7, maxn = 3e5 + 10;
int a[maxn];
int num[maxm][2];
int main(void) {
  int n;
  cin >> n;
  long long ans = 0;
  num[0][0] = 1;
  for (int i = 1; i < n + 1; i++) {
    scanf("%d", &a[i]);
    a[i] ^= a[i - 1];
    ans += num[a[i]][i % 2];
    num[a[i]][i % 2]++;
  }
  cout << ans << endl;
  return 0;
}
