#include <bits/stdc++.h>
using namespace std;
const double PI = M_PI;
const int INF = 1 * 1e9;
const long long limit = 1 * 1e12;
const int mod = 1e9 + 9;
const int MOD = 1e9 + 711;
const int MOD2 = 1e9 + 933;
const int MOD3 = 1e9 + 993;
const int maxn = 2e5 + 10;
int main() {
  cout.tie(0);
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  int n;
  cin >> n;
  vector<int> a(1 << 21), b(1 << 21);
  long long ans = 0, cur = 0;
  vector<int> v(n);
  a[0] = 1;
  for (int i = 0; i < n; ++i) {
    cin >> v[i];
    cur ^= v[i];
    if (i % 2) {
      ans += a[cur]++;
    } else {
      ans += b[cur]++;
    }
  }
  cout << ans;
  cerr << "\n\nTime elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n";
  return 0;
}
