#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,tune=native")
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using dbl = double;
const int N = 3e5 + 10;
const int MAXX = 1 << 20;
int n;
int cnt[MAXX][2];
void solve() {
  int x = 0;
  int a;
  ++cnt[x][1];
  scanf("%d", &n);
  ll ans = 0;
  for (int i = 0; i < n; ++i) {
    scanf("%d", &a);
    x ^= a;
    ans += cnt[x][i % 2];
    ++cnt[x][i % 2];
  }
  printf("%lld\n", ans);
}
int main() {
  int test_count = 1;
  for (int i = 0; i < test_count; ++i) {
    solve();
  }
  (void)0;
}
