#include #include #include using namespace std; using mint=atcoder::modint1000000007; int N; int A[2<<17]; mint dp[2<<17]; main() { cin>>N; int now=0; dp[0]=1; mint sum=1; mapmp; mp[now]=0; for(int i=0;i>A[i]; now^=A[i]; int id=-1; if(mp.find(now)!=mp.end())id=mp[now]; mp[now]=i+1; sum+=dp[i+1]=sum; if(id!=-1)sum-=dp[id]; } cout<