#include <bits/stdc++.h>
using namespace std;
long long int a[300000 + 5], b[2][(1 << 20) + 5];
int main() {
  int n;
  scanf("%d", &n);
  b[0][0] = 1;
  long long int ans = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%lld", &a[i]);
    a[i] = a[i - 1] ^ a[i];
    ans += b[i % 2][a[i]];
    b[i % 2][a[i]]++;
  }
  cout << ans << endl;
  return 0;
}
