#include<iostream>
#include<cstring>
#include<cstdio>
#include<algorithm>
using namespace std;
#define ios1 std::ios::sync_with_stdio(false)
#define ios2 std::cin.tie(0)
#define LL long long

LL n,a[201000];

int main()
{
    cin>>n;
    for(LL i=0;i<n;i++)
        cin>>a[i];
    LL  sum=0;
    for(LL i=0;i<n;i++)
    {
        LL ans=a[i],t=a[i];
        for(LL j=i;j<n;j++)
        {
            if(i==j)
            {
                sum++;
                continue ;
            }
            ans+=a[j];
            t^=a[j];
            //cout<<ans<<" "<<t<<endl;
            if(t==ans)
                sum++;
        }
    }
    cout<<sum<<endl;
    return 0;
}
