MOD = 998244353 N = int(input()) dp = [0] * (N + 2) dp[0] = 1 for i in range(N): for j in reversed(range(i + 2)): dp[j] = 25 * dp[j] + dp[j - 1] dp[j] %= MOD ans = 0 for i in range(N+1): ans += dp[i] * (i//3) ans %= MOD print(ans)