import sys sys.setrecursionlimit(5*10**5) input = sys.stdin.readline import pypyjit pypyjit.set_param('max_unroll_recursion=-1') from collections import defaultdict, deque, Counter from heapq import heappop, heappush from bisect import bisect_left, bisect_right from math import gcd mod = 998244353 n = int(input()) #nCk def com(n,mod): fact = [1,1] factinv = [1,1] inv = [0,1] for i in range(2,n+1): fact.append((fact[-1]*i)%mod) inv.append((-inv[mod%i]*(mod//i))%mod) factinv.append((factinv[-1]*inv[-1])%mod) return fact, factinv f,fi = com(5000, mod) def ncr(n,r): return f[n] * fi[r] * fi[n-r] % mod ans = 0 for k in range(1,n): if 3 * k > n: break for i in range(3*k-1,n): tmp = ncr(i,3*k-1) * pow(25, i-3*k+1,mod) * pow(26, n-i-1,mod) ans += tmp ans %= mod print(ans)