#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, i;
  long long int ans = 0;
  cin >> n;
  vector<int> xo(n + 1);
  map<int, map<int, int>> make_pair;
  xo[0] = 0;
  make_pair[0][0] = 1;
  for (i = 1; i <= n; i++) {
    cin >> xo[i];
    xo[i] = xo[i] ^ xo[i - 1];
    if (!make_pair[i % 2].count(xo[i]))
      make_pair[i % 2][xo[i]] = 1;
    else {
      ans += make_pair[i % 2][xo[i]];
      make_pair[i % 2][xo[i]]++;
    }
  }
  cout << ans << "\n";
}
