#include <bits/stdc++.h>
using namespace std;
const int max_n = (int)3e5 + 3;
const int max_a = (1 << 20) + 3;
int a[max_n];
int c[2][max_a];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> a[i];
  c[1][0] = 1;
  int x = 0;
  long long int res = 0;
  for (int i = 0; i < n; ++i) {
    x ^= a[i];
    res += c[i % 2][x];
    ++c[i % 2][x];
  }
  cout << res << endl;
  return 0;
}
