import java.io.*; import java.util.*; import java.util.function.*; import java.util.stream.*; public class Main { static final int MOD = 998244353; public static void main(String[] args) throws Exception { Scanner sc = new Scanner(); int n = sc.nextInt(); char[] inputs = sc.next().toCharArray(); int length = inputs.length; long[][] dp = new long[length][2]; int aCount = 0; if (inputs[0] == 'a') { aCount = 1; } else { dp[0][0] = inputs[0] - 'b'; dp[0][1] = 1; } for (int i = 1; i < length; i++) { int x = inputs[i] - 'a'; dp[i][0] = dp[i - 1][0] * 25 % MOD; dp[i][1] = (dp[i - 1][0] + dp[i - 1][1] * 25) % MOD; if (aCount == 0) { if (x > 0) { dp[i][0] += x - 1; dp[i][0] %= MOD; dp[i][1]++; dp[i][1] %= MOD; } } else if (aCount == 1) { if (x > 0) { dp[i][1] += x - 1; dp[i][1] %= MOD; } } if (x == 0) { aCount++; } } System.out.println(dp[length - 1][1]); } } class Scanner { BufferedReader br; StringTokenizer st = new StringTokenizer(""); StringBuilder sb = new StringBuilder(); public Scanner() { try { br = new BufferedReader(new InputStreamReader(System.in)); } catch (Exception e) { } } public int nextInt() { return Integer.parseInt(next()); } public long nextLong() { return Long.parseLong(next()); } public double nextDouble() { return Double.parseDouble(next()); } public String next() { try { while (!st.hasMoreTokens()) { st = new StringTokenizer(br.readLine()); } } catch (Exception e) { e.printStackTrace(); } finally { return st.nextToken(); } } }