#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  t = 1;
  while (t--) {
    long long int i, j, k, n, m;
    cin >> n;
    long long int a[1000000];
    for (i = 1; i <= n; i++) cin >> a[i];
    unordered_map<long long int, long long int> even, odd;
    even[0] = 1;
    long long int sum = 0;
    long long int xx = 0;
    for (i = 1; i <= n; i++) {
      if (i % 2 == 0) {
        xx = (xx ^ a[i]);
        if (even.find(xx) != even.end()) {
          sum = sum + even[xx];
          even[xx]++;
        } else {
          even[xx] = 1;
        }
      }
      if (i % 2 != 0) {
        xx = (xx ^ a[i]);
        if (odd.find(xx) != odd.end()) {
          sum = sum + odd[xx];
          odd[xx]++;
        } else {
          odd[xx] = 1;
        }
      }
    }
    cout << sum << endl;
  }
}
