#include #include #include using namespace std; using namespace atcoder; using mint = modint998244353; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf32 1000000001 #define Inf64 4000000000000000001 int main(){ int n; cin>>n; string s; cin>>s; vector dp(2,0); dp[0] = 1; rep(i,n){ vector ndp(2,0); if(s[i]=='0'){ ndp = dp; ndp[0] += dp[1]; } else{ ndp[1] = dp[0]+dp[1]; ndp[1] += dp[1]; } swap(dp,ndp); } cout<