#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
const int mod = 1e9 + 7;
signed main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  int n;
  cin >> n;
  int a[n], x;
  map<int, vector<int>> m;
  for (int i = int(0); i <= int(n - 1); i++) {
    cin >> a[i];
    if (i > 0)
      x = (a[i] ^ x);
    else
      x = a[i];
    m[x].push_back(i);
  }
  long long ans = 0;
  for (auto it : m) {
    vector<int>& v = it.second;
    if (it.first == 0) {
      for (int i : v)
        if (i & 1) ans++;
    }
    int o = 0, e = 0;
    for (int i : v) {
      if (i & 1) {
        ans += o;
        o++;
      } else {
        ans += e;
        e++;
      }
    }
  }
  cout << ans << '\n';
  return 0;
}
