#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using pr = pair<int, int>;
template <typename T>
inline void _read(T arr, int n) {
  for (int i = 0; i < n; i++) cin >> arr[i];
}
template <typename T>
inline void _write(T arr, int n, bool _space = true, bool _endl = true) {
  if (_space)
    for (int i = 0; i < n; i++) cout << arr[i] << " ";
  else
    for (int i = 0; i < n; i++) cout << arr[i];
  if (_endl) cout << endl;
}
const int MAXN = 300033;
int arr[MAXN];
int sum[MAXN];
int n;
unordered_map<int, int> cnt[2];
void __Main__() {
  cin >> n;
  _read(arr + 1, n);
  sum[0] = 0;
  for (int i = 1; i <= n; i++) {
    sum[i] = sum[i - 1] ^ arr[i];
  }
  cnt[0][0]++;
  ll ans = 0;
  for (int i = 1; i <= n; i++) {
    int t = i & 1;
    ans += cnt[t][sum[i]];
    cnt[t][sum[i]]++;
  }
  cout << ans << endl;
}
signed main() {
  ios ::sync_with_stdio(false);
  cin.tie(nullptr);
  __Main__();
  return 0;
}
