#include <bits/stdc++.h>
using namespace std;
const int inf = 2 * (1e9) + 10;
const long long infl = 2 * (1e18) + 10;
const long long MOD = 998244353;
const long NMAX = 300005;
const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, 1, 0, -1};
int n;
int main() {
  cin >> n;
  map<int, int> m[2];
  int sm = 0;
  long long rs = 0;
  m[0][0]++;
  for (int i = 1; i <= n; ++i) {
    int a;
    cin >> a;
    sm = sm ^ a;
    rs += m[i % 2][sm];
    m[i % 2][sm]++;
  }
  cout << rs << "\n";
  return 0;
}
