#include <bits/stdc++.h>
using namespace std;
int a[300005], sum[300005];
map<int, vector<int>> m;
int main() {
  int n;
  long long ans = 0;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  m[0].push_back(0);
  for (int i = 1; i <= n; i++) {
    sum[i] = sum[i - 1] ^ a[i];
    m[sum[i]].push_back(i);
  }
  for (auto x : m) {
    if (x.second.size() < 2) continue;
    int num0 = 0, num1 = 0;
    for (auto p : x.second) {
      if (p % 2 == 0) {
        ans += num0;
        num0++;
      } else {
        ans += num1;
        num1++;
      }
    }
  }
  cout << ans << endl;
}
