#include <bits/stdc++.h>
const int MAX = 2e6 + 10;
const int MOD = 1e9 + 7;
using namespace std;
int n;
int a[MAX];
int sum[2][MAX];
int main() {
  ios::sync_with_stdio(false), cout.tie(NULL);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  int pre = 0;
  long long ans = 0;
  sum[0][0] = 1;
  for (int i = 1; i <= n; i++) {
    pre ^= a[i];
    int nw = i & 1;
    ans += sum[nw][pre];
    sum[nw][pre]++;
  }
  cout << ans << endl;
  return 0;
}
