#include #include #include using namespace atcoder; using mint = modint998244353; using namespace std; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf 1000000001 int main(){ int n; cin>>n; string s; cin>>s; vector dp(2,vector(2,0)); dp[0][0] = 1; rep(i,n){ vector ndp(2,vector(2,0)); int t = s[i] - 'a'; rep(j,2){ rep(k,2){ rep(l,26){ int nj = j,nk = k; if(j&&l==0)continue; if(l==0)nj = 1; if(k==0&&l>t)continue; if(l