#include <bits/stdc++.h>
using namespace std;
long long int arr[300009];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> arr[i];
  unordered_map<int, int> odd, even;
  long long int val = 0, ans = 0;
  even[0] = 1;
  for (int i = 1; i <= n; i++) {
    val = val ^ arr[i];
    if (i % 2 == 1) {
      ans += odd[val];
      odd[val]++;
    } else {
      ans += even[val];
      even[val]++;
    }
  }
  cout << ans;
  return 0;
}
