#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const int MAX = 300005;
long long modexp(long long x, long long n) {
  if (n == 0) return 1LL;
  if (n % 2 == 0) {
    long long y = modexp(x, n / 2) % mod;
    return (y * y) % mod;
  }
  return (x * modexp(x, n - 1) % mod) % mod;
}
long long powr(long long x, long long n) {
  long long ans = 1;
  for (int i = 1; i <= n; i++) ans = ans * x;
  return ans;
}
map<int, long long> even, odd;
int main() {
  int n;
  scanf("%d", &n);
  int a[n + 1];
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  int p[n + 1];
  p[0] = 0;
  for (int i = 1; i <= n; i++) {
    p[i] = p[i - 1] ^ a[i];
  }
  for (int i = 1; i <= n; i++) {
    if (i % 2)
      odd[p[i]]++;
    else
      even[p[i]]++;
  }
  int curr = 0;
  long long ans = 0;
  for (int i = 1; i < n; i++) {
    if (i % 2 != 0) {
      if (even.count(curr)) ans += even[curr];
      odd[p[i]]--;
    } else {
      if (odd.count(curr)) ans += odd[curr];
      even[p[i]]--;
    }
    curr ^= a[i];
  }
  printf("%lld\n", ans);
  return 0;
}
