import itertools as iter import collections as coll import heapq as hq import bisect as bis from decimal import Decimal as dec from copy import deepcopy as dcopy import math import sys sys.setrecursionlimit(10**6) def input(): return sys.stdin.readline().rstrip() def getN(): return int(sys.stdin.readline()) def getNs(): return map(int,sys.stdin.readline().split()) def getList(): return list(map(int,sys.stdin.readline().split())) def strinps(n): return [sys.stdin.readline().rstrip() for _ in range(n)] pi = 3.141592653589793 mod = 10**9+7 MOD = 998244353 INF = math.inf dx = [1,0,-1,0]; dy = [0,1,0,-1] def ctoi(char): return ord(char)-ord('a') """ Main Code """ n = getN() s = input() l = [ctoi(c) for c in s] dp = [[0]*4 for _ in [0]*n] ndp = dcopy(dp) dp[0][0b00] = max(0,l[0]-1) dp[0][0b01] = int(l[0] != 0) dp[0][0b10] = int(l[0] != 0) dp[0][0b11] = int(l[0] == 0) #print(dp) for i in range(1,n): # 0 を 1 つも含まず、S より小さい dp[i][0b00] += dp[i-1][0b00] * 25; dp[i][0b00] %= MOD dp[i][0b00] += dp[i-1][0b10] * max(0,l[i]-1); dp[i][0b00] %= MOD # 0 を 1 つだけ含み、S より小さい dp[i][0b01] += dp[i-1][0b00]; dp[i][0b01] %= MOD dp[i][0b01] += dp[i-1][0b01] * 25; dp[i][0b01] %= MOD dp[i][0b01] += dp[i-1][0b10] * (l[i] != 0); dp[i][0b01] %= MOD dp[i][0b01] += dp[i-1][0b11] * max(0,l[i]-1); dp[i][0b01] %= MOD # 0 を 1 つも含まず、S と等しい dp[i][0b10] += dp[i-1][0b10] * (l[i] != 0); dp[i][0b10] %= MOD # 0 を 1 つだけ含み、S と等しい dp[i][0b11] += dp[i-1][0b10] * (l[i] == 0); dp[i][0b11] %= MOD dp[i][0b11] += dp[i-1][0b11] * (l[i] != 0); dp[i][0b10] %= MOD #print(dp) print(dp[n-1][0b01])