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