#include <bits/stdc++.h>
int a[2][1048596];
using namespace std;
int main() {
  memset(a, sizeof(a), 0);
  a[0][0] = 1;
  long long n, s = 0, ans = 0, x;
  cin >> n;
  for (long long i = 1; i < n + 1; i++) {
    cin >> x;
    s ^= x;
    ans += a[i % 2][s];
    a[i % 2][s]++;
  }
  cout << ans << endl;
}
