#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 5;
const int M = (1 << 20) + 5;
int n, arr[N], pref[N], cnt[2][M];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> arr[i];
  }
  pref[1] = arr[1];
  for (int i = 2; i <= n; i++) {
    pref[i] = pref[i - 1] ^ arr[i];
  }
  long long ans = 0;
  cnt[0][0] = 1;
  for (int i = 1; i <= n; i++) {
    ans += (long long)cnt[i % 2][pref[i]];
    cnt[i % 2][pref[i]]++;
  }
  cout << ans << '\n';
  return 0;
}
