#include <bits/stdc++.h>
using std::cin;
using std::cout;
using std::endl;
const int maxn = (int)3e5 + 3;
const int maxa = (1 << 20) + 3;
int n;
int a[maxn];
int cnt[2][maxa];
int32_t main() {
std::ios_base::sync_with_stdio(false);
cin >> n;
for(int i = 0; i < n; ++i) {
cin >> a[i];
}
cnt[1][0] = 1;
int x = 0;
int64_t res = 0;
for(int i = 0; i < n; ++i) {
x ^= a[i];
res += cnt[i % 2][x];
++cnt[i % 2][x];
}
cout << res << endl;
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+Cgp1c2luZyBzdGQ6OmNpbjsKdXNpbmcgc3RkOjpjb3V0Owp1c2luZyBzdGQ6OmVuZGw7Cgpjb25zdCBpbnQgbWF4biA9IChpbnQpM2U1ICsgMzsKY29uc3QgaW50IG1heGEgPSAoMSA8PCAyMCkgKyAzOwoKCmludCBuOwppbnQgYVttYXhuXTsKaW50IGNudFsyXVttYXhhXTsKCgppbnQzMl90IG1haW4oKSB7CiAgICBzdGQ6Omlvc19iYXNlOjpzeW5jX3dpdGhfc3RkaW8oZmFsc2UpOwoKICAgIGNpbiA+PiBuOwogICAgZm9yKGludCBpID0gMDsgaSA8IG47ICsraSkgewogICAgICAgIGNpbiA+PiBhW2ldOwogICAgfQogICAgY250WzFdWzBdID0gMTsKICAgIGludCB4ID0gMDsKICAgIGludDY0X3QgcmVzID0gMDsKICAgIGZvcihpbnQgaSA9IDA7IGkgPCBuOyArK2kpIHsKICAgICAgICB4IF49IGFbaV07CiAgICAgICAgcmVzICs9IGNudFtpICUgMl1beF07CiAgICAgICAgKytjbnRbaSAlIDJdW3hdOwoKICAgIH0KICAgIGNvdXQgPDwgcmVzIDw8IGVuZGw7CiAgICByZXR1cm4gMDsKfQo=