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