#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int MX = 2e5 + 5;
const long long INF = 1e18;
const long double PI = 4 * atan((long double)1);
long long power(long long a, long long n) {
  long long res = 1;
  while (n) {
    if (n % 2) res *= a;
    a *= a;
    n /= 2;
  }
  return res;
}
long long abst(long long a) { return ((a < 0) ? (-1 * a) : (a)); }
long long mp[2000001][2];
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  long long n;
  cin >> n;
  long long arr[n + 1], xr = 0;
  for (long long i = 0; i <= 2000000; i++) mp[i][0] = 0, mp[i][1] = 0;
  mp[0][0] = 1;
  arr[0] = 0;
  long long cnt = 0;
  for (long long i = 1; i <= n; i++) {
    cin >> arr[i];
    xr ^= arr[i];
    cnt += mp[xr][i % 2];
    mp[xr][i % 2]++;
  }
  cout << cnt << "\n";
  return 0;
}
