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 dp = [[[0 for _ in range(510)] for _ in range(210)] for _ in range(N + 1)] S = [[[0 for _ in range(510)] for _ in range(210)] for _ in range(N + 1)] dp[0][0][0] = 1 for k in range(510): S[0][0][k] = 1 for i in range(1, N + 1): for j in range(1, 200): for k in range(1, 500): if j >= 1 and k >= 1: dp[i][j][k] += S[i - 1][j - 1][k - 1] - (S[i - 1][j - 1][k - 10] if k >= 10 else 0) if j >= 2 and k >= 10: dp[i][j][k] += S[i - 1][j - 2][k - 10] - (S[i - 1][j - 2][k - 100] if k >= 100 else 0) if j >= 3 and k >= 100: dp[i][j][k] += S[i - 1][j - 3][k - 100] dp[i][j][k] %= mod S[i][j][k] += S[i][j][k - 1] + dp[i][j][k] S[i][j][k] %= mod ans = 0 for j in range(200): for k in range(500): if j + N - 1 == k: ans += dp[N][j][k] ans %= mod print(ans)