#include <bits/stdc++.h>
using namespace std;
int n, sum = 0, c, p[2000000][2];
long long t;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  p[0][0] = 1;
  for (int i = 1; i <= n; i++) {
    int x;
    cin >> x;
    sum ^= x;
    t += p[sum][i % 2];
    p[sum][i % 2]++;
  }
  cout << t;
  return 0;
}
