#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const int N = 3e5 + 1;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  map<long long, pair<int, int>> count;
  vector<long long> a(N);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  long long pre = 0, ans = 0;
  count[0].second = 1;
  for (int i = 1; i <= n; i++) {
    pre ^= a[i];
    if (i & 1) {
      ans += count[pre].first;
      count[pre].first++;
    } else {
      ans += count[pre].second;
      count[pre].second++;
    }
  }
  cout << ans;
}
