#include <bits/stdc++.h>
using namespace std;
const long long MA = 1LL << 20;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  vector<vector<long long>> g(2);
  for (long long i = 0; i <= 1; i++) g[i].resize(MA + 1, 0);
  long long c = 0;
  long long x;
  long long s = 0;
  g[0][0] = 1;
  for (long long i = 1; i <= n; i++) {
    cin >> x;
    s ^= x;
    c += g[i % 2][s];
    g[i % 2][s]++;
  }
  cout << c;
  return 0;
}
