#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 10;
int n;
int a[N];
int cnt[(1 << 22) + 10][2];
long long ans;
int main() {
  cin >> n;
  cnt[0][0] = 1;
  for (int i = 1, x = 0; i <= n; i++) {
    scanf("%d", &a[i]);
    x ^= a[i];
    cnt[x][i % 2]++;
  }
  for (int i = 0, len = (1 << 22); i <= len; i++) {
    ans += (cnt[i][0] * 1LL * (cnt[i][0] - 1) / 2) +
           (cnt[i][1] * 1LL * (cnt[i][1] - 1) / 2);
  }
  cout << ans << endl;
  return 0;
}
