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(610)] for _ in range(150)] for _ in range(N + 1)] S = [[[0 for _ in range(610)] for _ in range(150)] for _ in range(N + 1)] dp[0][0][0] = 1 for k in range(610): S[0][0][k] = 1 for i in range(1, N + 1): for j in range(1, 150): for k in range(1, 600): 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(150): for k in range(600): if j + N - 1 == k: ans += dp[N][j][k] ans %= mod print(ans)