#include <bits/stdc++.h>
using namespace std;
unsigned long long int mod = 1000000007;
unsigned long long int arr[300005];
int main() {
  unsigned long long int n;
  cin >> n;
  unsigned long long int ans = 0;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    if (i != 0) {
      arr[i] = arr[i] ^ arr[i - 1];
      if (arr[i] == 0 && (i + 1) % 2 == 0) {
        ans++;
      }
    }
  }
  map<int, pair<int, int> > m;
  for (int i = 0; i < n; i++) {
    if (m.find(arr[i]) == m.end()) {
      if ((i + 1) % 2 == 0) {
        m[arr[i]].first = 1;
        m[arr[i]].second = 0;
      } else {
        m[arr[i]].first = 0;
        m[arr[i]].second = 1;
      }
    } else {
      if ((i + 1) % 2 == 0) {
        m[arr[i]].first += 1;
      } else {
        m[arr[i]].second += 1;
      }
    }
  }
  for (auto it = m.begin(); it != m.end(); it++) {
    unsigned long long int f = it->second.first;
    unsigned long long int s = it->second.second;
    unsigned long long int a = f * (f - 1);
    unsigned long long int b = s * (s - 1);
    ans += a / 2;
    ans += b / 2;
  }
  cout << ans << endl;
}
