#include <bits/stdc++.h>
using namespace std;
const int MAXN = 300005;
map<int, int> mp[2];
int main() {
  int n;
  long long ans = 0;
  scanf("%d", &n);
  mp[1][0] = 1;
  for (int i = 0, cur = 0, x; i < n; ++i)
    scanf("%d", &x), cur ^= x, ans += mp[i % 2][cur]++;
  printf("%lld\n", ans);
  return 0;
}
