#include <bits/stdc++.h>
using namespace std;
map<int, int> m_odd, m_even;
int main() {
  int n, x, prefix = 0;
  long long ans = 0;
  cin >> n;
  m_even[0] = 1;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &x);
    prefix = prefix ^ x;
    if (i % 2 == 0) {
      ans += m_even[prefix];
      m_even[prefix] += 1;
    } else {
      ans += m_odd[prefix];
      m_odd[prefix] += 1;
    }
  }
  cout << ans << endl;
  return 0;
}
