#include <bits/stdc++.h>
using namespace std;
int N;
map<pair<long long, int>, int> m;
long long ans;
int main(int argc, char **argv) {
  scanf("%d", &N);
  long long cur = 0;
  m[{0, 1}] = 1;
  for (int i = 0; i < N; i++) {
    long long a;
    scanf("%lld", &a);
    cur ^= a;
    int parity = i % 2;
    ans += m[{cur, parity}];
    m[{cur, parity}]++;
  }
  printf("%lld\n", ans);
  return 0;
}
