#include <bits/stdc++.h>
using namespace std;
map<int, int> cnt[2];
int a[300005], pref[300005][22];
int main() {
  int n, i, j;
  long long ans = 0LL;
  cin >> n;
  for (i = 1; i <= n; i++) cin >> a[i];
  cnt[0][0]++;
  for (i = 1; i <= n; i++) {
    int no = 0;
    for (j = 0; j <= 20; j++) {
      pref[i][j] = (pref[i - 1][j] + ((a[i] & (1 << j)) > 0)) % 2;
      no = no + pref[i][j] * (1 << j);
    }
    int z = i % 2;
    if (cnt[z].count(no)) ans += (long long)cnt[z][no];
    cnt[z][no]++;
  }
  cout << ans;
}
