#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9;
const int N = 3e5 + 5;
const int MOD = 1e9 + 7;
const double EPS = 1e-8;
const double PI = acos(-1);
long long n, a[N];
set<long long> have;
long long freq[(1 << 20) + 5][2];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL), cout.tie(NULL);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    a[i] ^= a[i - 1];
    have.insert(a[i]);
  }
  long long ans = 0;
  freq[0][0] = 1;
  for (int i = 1; i <= n; i++) {
    if (i & 1) {
      ans += freq[a[i]][1];
      freq[a[i]][1]++;
    } else {
      ans += freq[a[i]][0];
      freq[a[i]][0]++;
    }
  }
  cout << ans << '\n';
}
