#include using namespace std; const long long MOD = 1000000007; int main(){ int N; cin >> N; vector A(N); for (int i = 0; i < N; i++){ cin >> A[i]; } vector X(N + 1); X[0] = 0; for (int i = 0; i < N; i++){ X[i + 1] = X[i] ^ A[i]; } map mp; mp[0] = 1; long long sum = 1; for (int i = 1; i < N; i++){ long long tmp = sum + MOD - mp[X[i]]; tmp %= MOD; mp[X[i]] = sum; sum = tmp + mp[X[i]]; sum %= MOD; } cout << sum << endl; }