#include <bits/stdc++.h>
using namespace std;
int a[3 * (int)1e5 + 5];
int pre[3 * (int)1e5 + 5];
map<long long, int> odds;
map<long long, int> evens;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++) {
    pre[i] = a[i - 1] ^ pre[i - 1];
  }
  for (int i = 0; i <= n; i += 2) {
    evens[pre[i]]++;
  }
  for (int i = 1; i <= n; i += 2) {
    odds[pre[i]]++;
  }
  long long cnt = 0;
  for (auto t : evens) {
    cnt += (long long)t.second * (t.second - 1) / 2;
  }
  for (auto t : odds) {
    cnt += (long long)t.second * (t.second - 1) / 2;
  }
  cout << cnt;
  return 0;
}
