#include <bits/stdc++.h>
using namespace std;
const int MAXN = 300010;
map<int, long long> dp[2];
int arr[MAXN], n;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &arr[i]);
  }
  dp[0][0] = 1;
  int acm = 0;
  long long res = 0;
  for (int i = 1; i <= n; i++) {
    acm ^= arr[i];
    res += dp[i & 1][acm];
    dp[i & 1][acm]++;
  }
  printf("%lld\n", res);
  return 0;
}
