#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const double eps = 1e-10;
const int mod = 1e9 + 7;
const int INF = 0x3f3f3f3f;
const int maxn = 3e5 + 5;
int n;
int a[maxn], pre[maxn];
vector<int> ve[(1 << 20) + 5];
int main(void) {
  scanf("%d", &n);
  pre[0] = 0;
  ve[0].push_back(0);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    pre[i] = pre[i - 1] ^ a[i];
    ve[pre[i]].push_back(i);
  }
  long long ans = 0;
  for (int i = 0; i <= (1 << 20) - 1; i++) {
    int even = 0, odd = 0;
    for (int j = 0; j < ve[i].size(); j++) {
      if (ve[i][j] % 2 == 0) {
        ans += even;
        even++;
      } else {
        ans += odd;
        odd++;
      }
    }
  }
  printf("%lld\n", ans);
  return 0;
}
