from typing import List, Tuple, Callable, TypeVar, Optional import sys import itertools import heapq import bisect import math from collections import deque, defaultdict from functools import lru_cache, cmp_to_key input = sys.stdin.readline if __file__ != 'prog.py': sys.setrecursionlimit(10 ** 6) def readints(): return map(int, input().split()) def readlist(): return list(readints()) def readstr(): return input()[:-1] def readlist1(): return list(map(lambda x: int(x) - 1, input().split())) N = int(input()) A = [ord(c) - ord('a') for c in readstr()] mod = 998244353 dp = [[0, 0], [0, 0]] dp[0][0] = 1 for i in range(N): ndp = [[0, 0], [0, 0]] ndp[1][1] += dp[1][1] * 25 ndp[1][1] += dp[0][1] ndp[0][1] += dp[0][1] * 25 if A[i] == 0: ndp[1][0] += dp[0][0] else: ndp[1][1] += dp[1][0] * (A[i] - 1) ndp[1][0] += dp[1][0] ndp[1][1] += dp[0][0] ndp[0][1] += dp[0][0] * (A[i] - 1) ndp[0][0] += dp[0][0] for j in range(2): for k in range(2): ndp[j][k] %= mod dp = ndp print(dp[1][1])