#include <bits/stdc++.h>
using namespace std;
int a[300010] = {0};
int b[2 << 20][2] = {0};
int main() {
  int n, t;
  cin >> n;
  long long m = 0;
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &t);
    a[i] = a[i - 1] ^ t;
  }
  for (int i = 0; i <= n; i++) {
    m += b[a[i]][i & 1];
    b[a[i]][i & 1]++;
  }
  cout << m;
}
