#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << " : " << arg1 << '\n';
  ;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
const long long POSITIVE_INFINITY = 9223372036854775807;
const long long NEGATIVE_INFINITY = -9223372036854775807;
const long double PI = acos(-1.0);
const long long MOD = 1000000007;
const long long INF = 1e18;
const long long N = 1e6 + 5;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long n, xr = 0;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; ++i) cin >> a[i];
  map<long long, long long> m1, m2;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    xr ^= a[i];
    if (i % 2 == 0)
      m1[xr]++;
    else
      m2[xr]++;
  }
  long long ans = 0, nxr = 0;
  for (long long i = 0; i < n; i++) {
    if (i % 2 == 0)
      ans += m2[nxr];
    else
      ans += m1[nxr];
    nxr ^= a[i];
    if (i % 2 == 0)
      m1[nxr]--;
    else
      m2[nxr]--;
  }
  cout << ans << '\n';
  ;
  return 0;
}
