#include <bits/stdc++.h>
using namespace std;
long long n, m, q, k;
string s;
int MOD = 1e9 + 7;
const int INF = 1e9;
const long long INF64 = 2e18;
const double PI = 3.141592653589793238463;
long long ar[500004], vis[500004];
map<int, int> cmap[5004];
vector<long long> gr[500004], vec;
set<long long> myset;
map<string, long long> mymap;
string st1[6004];
vector<long long> arr[500004];
int comp(pair<long long, long long> a, pair<long long, long long> b) {
  return a.second < b.second;
}
int mycomp1(long long a, long long b) { return a > b; }
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long a, b;
int main() {
  std::ios_base::sync_with_stdio(false);
  cin >> n;
  for (int i = 0; i < int(n); i++) cin >> ar[i];
  map<long long, long long> m;
  m[0] = 1;
  long long bitsol = 0, ans = 0;
  for (int i = 0; i + 1 < n; i += 2) {
    bitsol = bitsol ^ ar[i] ^ ar[i + 1];
    ans += m[bitsol]++;
  }
  m.clear();
  m[0] = 1;
  bitsol = 0;
  for (int i = 1; i + 1 < n; i += 2) {
    bitsol = bitsol ^ ar[i] ^ ar[i + 1];
    ans += m[bitsol]++;
  }
  return cout << ans, 0;
}
