#include <bits/stdc++.h>
using namespace std;
int x[1 << 20][2];
int main() {
  size_t n = 0;
  cin >> n;
  long long count = 0;
  x[0][0] = 1;
  int _xor = 0;
  for (size_t idx = 1; idx <= n; idx++) {
    int tmp = 0;
    cin >> tmp;
    size_t index = (_xor ^= tmp);
    count += (x[index][idx % 2]++);
  }
  cout << count;
}
