#include #include #include #include using namespace std; using i32 = int32_t; using u32 = uint32_t; using i64 = int64_t; using u64 = uint64_t; #define rep(i,n) for(int i=0; i<(n); i++) const u64 MOD = 998244353; int main(){ int N; cin >> N; vector A(N+1, 0); rep(i,N) cin >> A[i+1]; rep(i,N) A[i+1] ^= A[i]; map G; u64 ans = 1; for(int i=1; i<=N-1; i++){ i64 a = A[i]; u64& g = G[a]; u64 c = (ans + MOD - g) % MOD; g = ans; ans = (ans + c) % MOD; } cout << ans << endl; return 0; } struct ios_do_not_sync { ios_do_not_sync() { ios::sync_with_stdio(false); cin.tie(nullptr); } } ios_do_not_sync_instance;