#include <bits/stdc++.h>
using namespace std;
unsigned long long n, dp[2][3000000], v[300001], ans = 0;
int main() {
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> v[i];
  dp[0][0] = 1;
  unsigned long long r = 0;
  for (int i = 1; i <= n; ++i) {
    r ^= v[i];
    ans += dp[i % 2][r];
    dp[i % 2][r]++;
  }
  cout << ans;
}
