#include <bits/stdc++.h>
using namespace std;
int n;
int rec[300005];
int pre[300005];
int dp[2100000][2];
long long ans;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> rec[i];
  for (int i = 1; i <= n; i++) pre[i] = pre[i - 1] ^ rec[i];
  dp[0][0] = 1;
  for (int i = 1; i <= n; i++) {
    ans += dp[pre[i]][i & 1];
    dp[pre[i]][i & 1]++;
  }
  cout << ans;
  return 0;
}
