local mod = 998244353 local mfl = math.floor local function bmul(x, y) local x0, y0 = x % 31596, y % 31596 local x1, y1 = mfl(x / 31596), mfl(y / 31596) return (x1 * y1 * 62863 + (x1 * y0 + x0 * y1) * 31596 + x0 * y0) % mod end local function badd(x, y) return (x + y) % mod end local n = io.read("*n") local a, b, c = {}, {}, {} local lim = 1002 for i = 1, lim do a[i], b[i], c[i] = 0, 0, 0 end local nothing = 1 for i = 1, n do for j = lim, 1, -1 do c[j] = badd(c[j] * 25, b[j]) b[j] = badd(b[j] * 25, a[j]) if 1 < j then a[j] = badd(a[j] * 25, c[j - 1]) else a[j] = badd(a[j] * 25, nothing) end end nothing = bmul(nothing, 25) end local ret = 0 for i = 1, lim do local x = badd(a[i], b[i]) x = bmul(x, i - 1) local y = bmul(c[i], i) ret = badd(ret, x) ret = badd(ret, y) end print(ret)