from collections import * from itertools import * from functools import * from heapq import * import sys,math input = sys.stdin.readline class combination(): def __init__(self,N,p): self.fact = [1, 1] # fact[n] = (n! mod p) self.factinv = [1, 1] # factinv[n] = ((n!)^(-1) mod p) self.inv = [0, 1] # factinv 計算用 self.p = p for i in range(2, N + 1): self.fact.append((self.fact[-1] * i) % p) self.inv.append((-self.inv[p % i] * (p // i)) % p) self.factinv.append((self.factinv[-1] * self.inv[-1]) % p) def cmb(self,n, r): if (r < 0) or (n < r): return 0 r = min(r, n - r) return self.fact[n] * self.factinv[r] * self.factinv[n-r] % self.p mod = 998244353 N = int(input()) c = combination(10**6,mod) def p(n,r): tmp = c.fact[n]*c.factinv[n-r] return tmp%mod for K in range(1,N+1): ans = c.fact[K]*c.fact[N-K+1] ans %= mod ans *= pow(K+1,mod-2,mod)*c.factinv[K-1] ans %= mod ans *= p(N+1,K+1) ans %= mod print(ans)