#include <bits/stdc++.h>
using namespace std;
int main() {
  long long N;
  cin >> N;
  unordered_map<long long, pair<long long, long long>> m;
  long long* arr = new long long[N];
  long long xor_val = 0;
  long long count = 0;
  m[0] = make_pair(1, 0);
  for (long long i = 0; i < N; i++) {
    cin >> arr[i];
    xor_val = xor_val ^ arr[i];
    if (m.count(xor_val) > 0) {
      if (i % 2 == 0) {
        count += m[xor_val].second;
        m[xor_val].second++;
      } else {
        count += m[xor_val].first;
        m[xor_val].first++;
      }
    } else {
      if (i % 2 == 0) {
        m[xor_val] = make_pair(0, 1);
      } else {
        m[xor_val] = make_pair(1, 0);
      }
    }
  }
  cout << count << endl;
  return 0;
}
