#include <bits/stdc++.h>
using namespace std;
vector<string> vec_splitter(string s) {
  s += ',';
  vector<string> res;
  while (!s.empty()) {
    res.push_back(s.substr(0, s.find(',')));
    s = s.substr(s.find(',') + 1);
  }
  return res;
}
void debug_out(vector<string> __attribute__((unused)) args,
               __attribute__((unused)) int idx,
               __attribute__((unused)) int LINE_NUM) {
  cerr << '\n';
}
template <typename Head, typename... Tail>
void debug_out(vector<string> args, int idx, int LINE_NUM, Head H, Tail... T) {
  if (idx > 0)
    cerr << ", ";
  else
    cerr << "Line(" << LINE_NUM << ") ";
  stringstream ss;
  ss << H;
  cerr << args[idx] << " = " << ss.str();
  debug_out(args, idx + 1, LINE_NUM, T...);
}
void run() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr), cout.tie(nullptr);
}
const int N = 3e5 + 5;
int main() {
  run();
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; ++i) {
    cin >> v[i];
  }
  vector<vector<int> > pref(2, vector<int>((1 << 20) + 1)), pos(2);
  int cum = 0;
  for (int i = 0; i < n; ++i) {
    cum ^= v[i];
    pref[i % 2][cum]++;
    pos[i % 2].push_back(cum);
  }
  long long ans = 0;
  for (auto i : pos[0]) {
    if (pref[0][i]) {
      pref[0][i]--;
      ans += pref[0][i];
    }
  }
  for (auto i : pos[1]) {
    if (pref[1][i]) {
      pref[1][i]--;
      ans += pref[1][i];
    }
    if (i == 0) ans++;
  }
  cout << ans << '\n';
}
