#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:5000000000")
const long long mod = 1000000007;
long long Inf = (long long)2e9;
long long LINF = (long long)1e18 + 1e17;
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  map<pair<int, int>, long long> cnt;
  long long ans = 0;
  int cur_xor = 0;
  int n;
  cin >> n;
  cnt[{1, 0}] = 1;
  for (int i = 0; i < n; i++) {
    long long a;
    cin >> a;
    cur_xor = (cur_xor ^ a);
    ans += cnt[{i % 2, cur_xor}];
    cnt[{i % 2, cur_xor}]++;
  }
  cout << ans;
}
