#include <bits/stdc++.h>
using namespace std;
const long long MAX = 5e5;
const long long MAXN = 1000;
const double PI = acos(-1.0);
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long a[MAX] = {}, xxx[MAX] = {}, sum[1 << 20][2] = {}, ans = 0;
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    xxx[i] = a[i] ^ xxx[i - 1];
  }
  sum[0][0]++;
  for (int i = 1; i <= n; i++) {
    ans += sum[xxx[i]][i & 1];
    sum[xxx[i]][i & 1]++;
  }
  cout << ans << endl;
  return 0;
}
