#include <bits/stdc++.h>
using namespace std;
const int N = 2500010;
long long num[N][2];
int a[300010];
int n;
long long ans;
void cal() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++) a[i] ^= a[i - 1];
  for (int i = 0; i <= n; i++) num[a[i]][i % 2]++;
  for (int i = 0; i < (1 << 21); i++)
    ans += (long long)num[i][0] * (num[i][0] - 1) / 2 +
           num[i][1] * (num[i][1] - 1) / 2;
  cout << ans;
}
int main() {
  cal();
  cin.get();
  cin.get();
  return 0;
}
