#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
int main() {
  int n;
  cin >> n;
  map<unsigned long long, int> m[2];
  vector<unsigned long long> v(n);
  unsigned long long a = 0;
  m[0][a]++;
  long long ans = 0;
  for (int i = 1; i <= n; i++) {
    cin >> v[i - 1];
    a = a ^ v[i - 1];
    ans += m[i % 2][a];
    m[i % 2][a]++;
  }
  cout << ans;
  return 0;
}
