#include<cstdio> #include<map> #include<iostream> #include<algorithm> using namespace std; int n; long long ans,pre; map<pair<int,int>,int> M; main() { scanf("%d",&n); cin>>pre; M[{1,pre}]++; for(int i=2,x;i<=n;i++){ scanf("%d",&x); pre^=x; ans+=M[{i&1,pre}]; if(pre==0&&i%2==0) ans++; M[{i&1,pre}]++; } cout<<ans<<endl; }