#include <bits/stdc++.h>
using namespace std;
const long long INF64 = (long long)(1e18) + 10;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int q = 1, i, j, test, k;
  for (test = 1; test < (q + 1); test++) {
    long long n, ans = 0, x = 0;
    cin >> n;
    vector<long long> v(n);
    for (i = 0; i < (n); i++) cin >> v[i];
    map<long long, long long> prefodd, prefeven;
    prefodd[0]++;
    for (i = 0; i < (n); i++) {
      x = x ^ v[i];
      if (i & 1)
        ans += prefodd[x], prefodd[x]++;
      else
        ans += prefeven[x], prefeven[x]++;
    }
    cout << ans << '\n';
  }
}
