#include <bits/stdc++.h>
using namespace std;
int pref[300005];
int dp[2][(1 << 20) + 5];
int main() {
  int n;
  cin >> n;
  int x;
  cin >> x;
  dp[1][0] = 1;
  pref[0] = x;
  long long sum = 0;
  sum += dp[0][x]++;
  for (int i = 1; i < n; i++) {
    cin >> x;
    pref[i] = x ^ pref[i - 1];
    sum += dp[i % 2][pref[i]]++;
  }
  cout << sum << endl;
  return 0;
}
