import sys import pypyjit import itertools import heapq import math from collections import deque, defaultdict import bisect input = sys.stdin.readline # sys.setrecursionlimit(10 ** 6) # pypyjit.set_param('max_unroll_recursion=-1') N = int(input()) mod = 998_244_353 S = [[0 for _ in range(1010)] for _ in range(310)] for k in range(1010): S[0][k] = 1 for i in range(1, N + 1): dp = [[0 for _ in range(1010)] for _ in range(310)] nxt = [[0 for _ in range(1010)] for _ in range(310)] for j in range(1, 300 + 1): for k in range(1, 500 + 1): if j >= 1 and k >= 1: dp[j][k] += S[j - 1][k - 1] - (S[j - 1][k - 10] if k >= 10 else 0) if j >= 2 and k >= 10: dp[j][k] += S[j - 2][k - 10] - (S[j - 2][k - 100] if k >= 100 else 0) if j >= 3 and k >= 100: dp[j][k] += S[j - 3][k - 100] dp[j][k] %= mod nxt[j][k] += nxt[j][k - 1] + dp[j][k] nxt[j][k] %= mod S = nxt ans = 0 for j in range(300 + 1): for k in range(1000 + 1): if j + N - 1 == k: ans += dp[j][k] ans %= mod print(ans)