N = int(input()) S = input() A = [ord(s) - ord('a') for s in S] P = 998244353 dp = [[[0] * 2 for _ in range(2)] for _ in range(N)] if A[0] > 0: dp[0][0][0] = A[0] - 1 dp[0][0][1] = 1 dp[0][1][0] = 1 dp[0][1][1] = 0 else: dp[0][0][0] = 0 dp[0][0][1] = 0 dp[0][1][0] = 0 dp[0][1][1] = 1 for i in range(N-1): dp[i+1][1][0] =(dp[i+1][1][0] + dp[i][0][0]) % P dp[i+1][0][0] =(dp[i+1][0][0] + dp[i][0][0] * 25) % P if A[i+1] == 0: dp[i+1][1][1] =(dp[i+1][1][1] + dp[i][0][1]) % P else: dp[i+1][0][1] =(dp[i+1][0][1] + dp[i][0][1]) % P dp[i+1][0][0] =(dp[i+1][0][0] + dp[i][0][1] * (A[i+1] - 1)) % P dp[i+1][1][0] =(dp[i+1][1][0] + dp[i][0][1]) % P dp[i+1][1][0] =(dp[i+1][1][0] + dp[i][1][0] * 25) % P if A[i+1] > 0: dp[i+1][1][1] =(dp[i+1][1][1] + dp[i][1][1]) % P dp[i+1][1][0] =(dp[i+1][1][0] + dp[i][1][1] * (A[i+1] - 1)) % P ans = dp[N-1][1][0] print(ans % P)