#include <bits/stdc++.h>
using namespace std;
using lint = long long;
using ulint = unsigned long long;
const int N = 3e5 + 1;
const int A = (1 << 22) + 1;
int arr[N];
int cnt[2][A];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  int curr = 0;
  lint ans = 0;
  cnt[1][0] = 1;
  for (int i = 0; i < n; i++) {
    curr ^= arr[i];
    ans += cnt[i & 1][curr];
    cnt[i & 1][curr]++;
  }
  cout << ans << endl;
}
