#include <bits/stdc++.h>
using namespace std;
const long long MaX = 100005, infi = 1110111110111, mod = 1000000007;
const int MX = 300005;
long long n, m, sol, occ;
int acc[1 << 22][2];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  acc[0][0] = 1;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> m;
    occ ^= m;
    sol += acc[occ][i % 2]++;
  }
  cout << sol;
  return 0;
}
