local mod = 998244353 local function badd(x, y) return (x + y) % mod end local n = io.read("*n") local lim = 210 local t = {} for i = 0, n - 1 do t[i] = 0 end t[0] = 1 for irep = 1, n do for j = n - 1, 0, -1 do for k = 2, 9 do if j + k - 1 <= n - 1 then t[j + k - 1] = badd(t[j + k - 1], t[j]) end end for k = 10, 99 do if j + k - 2 <= n - 1 then t[j + k - 2] = badd(t[j + k - 2], t[j]) end end for k = 100, lim do if j + k - 3 <= n - 1 then t[j + k - 3] = badd(t[j + k - 3], t[j]) end end end end print(t[n - 1])