#include <bits/stdc++.h>
using namespace std;
void edit(vector<int> &skill, int n) {
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    skill.push_back(x);
  }
}
bool cmp(pair<long long, long long> p1, pair<long long, long long> p2) {
  if (p1.second > p2.second) return true;
  if (p1.second < p2.second) return false;
  if (p1.first > p2.first)
    return true;
  else
    return false;
}
void editl(vector<long long> &skill, long long n) {
  for (long long i = 0; i < n; i++) {
    long long x;
    cin >> x;
    skill.push_back(x);
  }
}
void editpl(vector<pair<long long, long long>> &skill, long long n) {
  for (long long i = 0; i < n; i++) {
    long long x, y;
    cin >> x >> y;
    skill.push_back({x, y});
  }
}
const int M = 1000000007;
long long mod(long long x) { return ((x % M + M) % M); }
long long add(long long a, long long b) { return mod(mod(a) + mod(b)); }
long long mul(long long a, long long b) { return mod(mod(a) * mod(b)); }
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
bool isGoogles = 0;
bool testcase = 0;
void achilles() {
  long long n;
  cin >> n;
  vector<long long> arr;
  editl(arr, n);
  long long x = 0;
  map<long long, vector<long long>> m;
  m[0].push_back(0);
  long long u = 0;
  for (auto a : arr) {
    u++;
    x ^= a;
    m[x].push_back(u);
  }
  long long ans = 0;
  for (auto a : m) {
    long long ev = 0, odd = 0;
    for (auto b : a.second) {
      if (b % 2)
        odd++;
      else
        ev++;
    }
    ans += (ev * (ev - 1)) / 2;
    ans += (odd * (odd - 1)) / 2;
  }
  cout << ans << "\n";
}
int main() {
  ios ::sync_with_stdio(0);
  cin.tie(0);
  long long t = 1, w = 1;
  if (testcase) cin >> t;
  while (t--) {
    if (isGoogles) {
      cout << "Case #" << w << ": ";
    }
    achilles();
    w++;
  }
  return 0;
}
