#include <bits/stdc++.h>
using namespace std;
const int big = 1e7 + 5;
long long int arr[big];
void minDivsieve() {
  for (long long int i = 0; i <= big; ++i) arr[i] = i;
  for (long long int i = 2; i <= big; ++i) {
    if (arr[i] != i) continue;
    for (long long int j = i; j <= big; j += i) arr[j] = min(arr[j], i);
  }
}
long long int fac[1000001];
long long int power(long long int x, long long int y, long long int p) {
  long long int res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long int modInverse(long long int n, int p) { return power(n, p - 2, p); }
long long int nCrModPFermat(unsigned long long n, long long int r,
                            long long int p) {
  if (r == 0) return 1;
  return (fac[n] * modInverse(fac[r], p) % p * modInverse(fac[n - r], p) % p) %
         p;
}
int dp[2][1048577];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int test = 1;
  while (test--) {
    int n;
    cin >> n;
    long long int arr[n];
    for (int i = 0; i < n; ++i) cin >> arr[i];
    long long int res = 0;
    long long int currxor = 0;
    dp[1][0] = 1;
    for (int i = 0; i < n; ++i) {
      currxor = currxor ^ arr[i];
      res += dp[i % 2][currxor];
      dp[i % 2][currxor] += 1;
    }
    cout << res;
  }
  return 0;
}
