from typing import List, Tuple, Callable, TypeVar import sys import itertools import heapq import bisect import math from collections import deque, defaultdict, Counter from functools import lru_cache, cmp_to_key input = sys.stdin.readline if __file__ != 'prog.py': sys.setrecursionlimit(10 ** 6) def readints(): return map(int, input().split()) def readlist(): return list(readints()) def readstr(): return input()[:-1] N = int(input()) mod = 998244353 dp = [0] * (N + 1) dp[0] = 1 for _ in range(N): ndp = [0] * (N + 1) for j in range(N + 1): if j: ndp[j] += dp[j - 1] ndp[j] += 25 * dp[j] ndp[j] %= mod dp = ndp ans = 0 for i in range(N + 1): ans += (i // 3) * dp[i] ans %= mod print(ans)