N=int(input()) S=list(map(lambda x:ord(x)-ord("a"),input())) # a->0, b->1, ..., y->24, z->25 に変換 DP=[[1,0],[0,0]] # DP[mode][flag]:=辞書式未満が確定して (いて/おらず), 'a' を使ってい (る/ない) 文字列の個数 Mod=998244353 for x in S: E=DP DP=[[0,0],[0,0]] # False -> False if x==0: DP[0][1]=E[0][0] else: DP[0][0]=E[0][0] DP[0][1]=E[0][1] # False -> True if x!=0: DP[1][1]=E[0][0] DP[1][0]+=E[0][0]*(x-1) DP[1][1]+=E[0][1]*(x-1) # True -> True DP[1][0]+=E[1][0]*25 DP[1][1]+=E[1][0] DP[1][1]+=E[1][1]*25 DP[0][0]%=Mod DP[0][1]%=Mod DP[1][0]%=Mod DP[1][1]%=Mod print(DP[1][1])