#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int i, j, k, t, b, c, d, g, n, m, flag, p, q, l, r, x, y, z;
  cin >> n;
  int a[n + 1];
  for (i = 1; i <= n; i++) cin >> a[i];
  unordered_map<int, pair<int, int>> mp;
  mp[0] = make_pair(1, 0);
  a[0] = 0;
  c = 0;
  for (i = 1; i <= n; i++) {
    a[i] = a[i - 1] ^ a[i];
    if (mp.find(a[i]) != mp.end()) {
      if (i % 2 == 0)
        c = c + mp[a[i]].first++;
      else
        c = c + mp[a[i]].second++;
    } else {
      if (i % 2 == 0)
        mp[a[i]] = make_pair(1, 0);
      else
        mp[a[i]] = make_pair(0, 1);
    }
  }
  cout << c;
  return 0;
}
