#include <bits/stdc++.h>
using namespace std;
long long GCD(long long a, long long b) { return b ? GCD(b, a % b) : a; }
const long long N = 3e5 + 7;
const long long inf = 8e18 + 7;
const int mod = 998244353;
int n, a[N];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  map<int, pair<int, int>> mp;
  mp[0].second++;
  int now = 0;
  for (int i = 1; i <= n; i++) {
    now ^= a[i];
    if (i & 1) {
      mp[now].first++;
    } else {
      mp[now].second++;
    }
  }
  long long ans = 0;
  for (auto& v : mp) {
    auto it = v.second;
    long long x = it.first;
    long long y = it.second;
    ans += x * (x - 1) / 2 + y * (y - 1) / 2;
  }
  cout << ans << "\n";
  return 0;
}
