#include <bits/stdc++.h>
using namespace std;
const int max_n = 1 << 20;
int odd[max_n], even[max_n];
int main() {
  cin.tie(NULL);
  ios_base::sync_with_stdio(false);
  for (int i = 0; i < max_n; i++) {
    odd[i] = 0;
    even[i] = 0;
  }
  int n;
  cin >> n;
  vector<int> x(n);
  even[0] = 1;
  int my_xor = 0;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    my_xor = my_xor ^ a;
    if (i % 2 == 0)
      odd[my_xor]++;
    else
      even[my_xor]++;
  }
  long long ans = 0;
  for (int i = 0; i < max_n; i++)
    ans +=
        (long long)odd[i] * (odd[i] - 1) + (long long)even[i] * (even[i] - 1);
  cout << ans / 2 << endl;
}
