#include <bits/stdc++.h>
#pragma GCC optimize("O3")
constexpr auto INF = 9223372036854775807;
using namespace std;
struct custom_hash {
  static uint64_t splitmix64(uint64_t x) {
    x += 0x9e3779b97f4a7c15;
    x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
    x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
    return x ^ (x >> 31);
  }
  size_t operator()(uint64_t x) const {
    static const uint64_t FIXED_RANDOM =
        chrono::steady_clock::now().time_since_epoch().count();
    return splitmix64(x + FIXED_RANDOM);
  }
};
inline long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long int mod_power(long long int x, long long int y) {
  long long int res = 1;
  x = x % 1000000007;
  if (x == 0) return 0;
  while (y > 0) {
    if (y & 1) res = (res * x) % 1000000007;
    y = y >> 1;
    x = (x * x) % 1000000007;
  }
  return res;
}
long long modInverse(long long n) { return mod_power(n, 1000000007 - 2); }
long long nCrModPFermat(long long n, long long int r) {
  if (r == 0) return 1;
  vector<long long int> fac(n + 1, 0);
  fac[0] = 1;
  for (int i = 1; i <= n; i++) fac[i] = (fac[i - 1] * i) % 1000000007;
  return (fac[n] * modInverse(fac[r]) % 1000000007 * modInverse(fac[n - r]) %
          1000000007) %
         1000000007;
}
bool isprime(long long int n) {
  if (n == 2) return true;
  if (n % 2 == 0 || n == 1) {
    return false;
  }
  for (long long int j = 3; j <= sqrt(n); j += 2) {
    if (n % j == 0) {
      return false;
    }
  }
  return true;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  long long int n;
  cin >> n;
  vector<long long int> arr(n, 0);
  unordered_map<long long int, pair<long long int, long long int>> mp;
  vector<long long int> xor_arr(n + 1, 0);
  long long int xor_sum = 0;
  for (long long int i = (long long int)0; i < (long long int)n; i += 1) {
    cin >> arr[i];
    xor_sum ^= arr[i];
    if (mp.find(xor_sum) == mp.end()) mp[xor_sum] = {0, 0};
    if ((i + 1) % 2 == 0)
      mp[xor_sum].first += 1;
    else
      mp[xor_sum].second += 1;
    xor_arr[i + 1] = xor_arr[i] ^ arr[i];
  }
  long long int ans = 0;
  mp[0].first += 1;
  for (auto it = mp.begin(); it != mp.end(); it++) {
    auto temp = (*it);
    ans += ((temp.second.first) * (temp.second.first - 1)) / 2;
    ans += ((temp.second.second) * (temp.second.second - 1)) / 2;
  }
  cout << ans << '\n';
  return 0;
}
