#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  long long a[n], pref[n + 1], cnt0, cnt1, cnt = 0;
  for (auto &x : a) cin >> x;
  ;
  map<long long, vector<long long>> m;
  pref[0] = 0;
  for (long long i = 1; i <= n; ++i) pref[i] = a[i - 1] ^ pref[i - 1];
  for (long long i = 0; i <= n; ++i) m[pref[i]].push_back(i % 2);
  for (auto x : m) {
    cnt0 = 0, cnt1 = 0;
    for (auto z : m[x.first]) {
      cnt0 += (z == 0);
      cnt1 += (z == 1);
    }
    cnt += (cnt0 * (cnt0 - 1)) / 2 + (cnt1 * (cnt1 - 1)) / 2;
  }
  cout << cnt << "\n";
  return 0;
}
