MOD = 998244353 n = int(input()) S = input() S = [ord(s) - 97 for s in S] # dp[i][eq][a] dp = [[[0] * 2 for _ in range(2)] for _ in range(n + 1)] dp[0][1][0] = 1 for i, s in enumerate(S, 1): if s == 0: dp[i][0][1] = dp[i - 1][0][0] + dp[i - 1][0][1] * 25 dp[i][1][1] = dp[i - 1][1][0] else: dp[i][0][0] = dp[i - 1][0][0] * 25 + dp[i - 1][1][0] * (s - 1) dp[i][0][1] = dp[i - 1][0][0] + dp[i - 1][0][1] * 25 + dp[i - 1][1][0] + dp[i - 1][1][1] * (s - 1) dp[i][1][0] = dp[i - 1][1][0] dp[i][1][1] = dp[i - 1][1][1] for j in range(2): for k in range(2): dp[i][j][k] %= MOD print(dp[-1][0][1])