#include <bits/stdc++.h>
using namespace std;
int main() {
  {
    long long i, j, k, l, m, n, f = 0, cnt = 0, ff = -1, a;
    cin >> n;
    unsigned long long arr[n];
    for (i = 0; i < n; i++) cin >> arr[i];
    for (i = 1; i < n; i++) arr[i] = arr[i - 1] ^ arr[i];
    map<unsigned long long, unsigned long long> vec_odd, vec_eve;
    map<unsigned long long, unsigned long long> mp;
    for (i = 0; i < n; i++) {
      if (i & 1 && arr[i] == 0) f++;
      if (i & 1)
        vec_odd[arr[i]]++;
      else
        vec_eve[arr[i]]++;
      mp[arr[i]]++;
    }
    for (auto it : mp) {
      unsigned long long a = vec_odd[it.first], b = vec_eve[it.first];
      f += ((a * (a - 1)) / 2);
      f += ((b * (b - 1)) / 2);
    }
    cout << f << endl;
  }
}
