//@formatter:off #include #include #define rep(i,n) for (int i = 0; i < int(n); ++i) #define rrep(i,n) for (int i = int(n)-1; i >= 0; i--) #define rep2(i,s,n) for (int i = int(s); i < int(n); ++i) #define all(a) a.begin(),a.end() #define rall(a) a.rbegin(),a.rend() #define pb push_back #define eb emplace_back #define vi vector #define vvi vector> #define vl vector #define vvl vector> #define vd vector #define vvd vector> #define vs vector #define vc vector #define vvc vector> #define vb vector #define vvb vector> #define vp vector

#define vvp vector> using namespace std; using ll = long long; using P = pair; using LP = pair; template istream& operator>>(istream &is,pair &p) { return is >> p.first >> p.second; } template ostream& operator<<(ostream &os,const pair &p) { return os<<'{'< istream& operator>>(istream &is,vector &v) { for(T &t:v){is>>t;} return is; } template ostream& operator<<(ostream &os,const vector &v) { os<<'[';rep(i,v.size())os< void fin(T a) { cout << a << endl; exit(0); } template bool chmin(T& a,T b) {if(a > b){a = b; return true;} return false;} template bool chmax(T& a,T b) {if(a < b){a = b; return true;} return false;} const int inf = 1001001001; const ll linf = 1001001001001001001; //@formatter:on //constexpr int mod = 1000000007; constexpr int mod = 998244353; struct mint { ll x; constexpr mint(ll x = 0) : x((x % mod + mod) % mod) {} constexpr mint operator-() const { return mint(-x); } constexpr mint &operator+=(const mint &a) { if ((x += a.x) >= mod) x -= mod; return *this; } constexpr mint &operator++() { return *this += mint(1); } constexpr mint &operator-=(const mint &a) { if ((x += mod - a.x) >= mod) x -= mod; return *this; } constexpr mint &operator--() { return *this -= mint(1); } constexpr mint &operator*=(const mint &a) { (x *= a.x) %= mod; return *this; } constexpr mint operator+(const mint &a) const { mint res(*this); return res += a; } constexpr mint operator-(const mint &a) const { mint res(*this); return res -= a; } constexpr mint operator*(const mint &a) const { mint res(*this); return res *= a; } constexpr mint pow(ll t) const { mint res = mint(1), a(*this); while (t > 0) { if (t & 1) res *= a; t >>= 1; a *= a; } return res; } // for prime mod constexpr mint inv() const { return pow(mod - 2); } constexpr mint &operator/=(const mint &a) { return *this *= a.inv(); } constexpr mint operator/(const mint &a) const { mint res(*this); return res /= a; } }; ostream &operator<<(ostream &os, const mint &a) { return os << a.x; } bool operator==(const mint &a, const mint &b) { return a.x == b.x; } bool operator!=(const mint &a, const mint &b) { return a.x != b.x; } bool operator==(const mint &a, const int &b) { return a.x == b; } bool operator!=(const mint &a, const int &b) { return a.x != b; } // Number Theoretic Transform namespace NTT { void trans(vector &v, bool inverse = false) { int sz = v.size(); if (sz == 1) return; vector a, b; rep(i, sz / 2) { a.pb(v[2 * i]); b.pb(v[2 * i + 1]); } trans(a, inverse); trans(b, inverse); mint m = mint(3).pow((mod - 1) / sz); if (inverse) m = m.inv(); mint now = 1; rep(i, sz) { v[i] = a[i % (sz / 2)] + now * b[i % (sz / 2)]; now *= m; } } vector multiply(const vector &f, const vector &g) { assert(mod == 998244353); vector nf, ng; int sz = 1; while (sz < f.size() + g.size() - 1) sz *= 2; nf.resize(sz); ng.resize(sz); rep(i, f.size()) nf[i] = f[i]; rep(i, g.size()) ng[i] = g[i]; trans(nf); trans(ng); rep(i, sz) nf[i] *= ng[i]; trans(nf, true); rep(i, sz) nf[i] /= mint(sz); return nf; } vector pow(const vector &f, int k) { int n = f.size(); vector res(n, 0); res[0] = 1; vector now = f; while (k > 0) { if (k & 1) { res = multiply(res, now); if (res.size() > n) res.erase(res.begin() + n, res.end()); } now = multiply(now, now); if (now.size() > n) now.erase(now.begin() + n, now.end()); k >>= 1; } return res; } }; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); int n; cin >> n; vector v(2 * n - 1, 0); mint now = 1; rep2(i, 1, n) { if (i > 1) now /= i - 1; v[i] = now * i; } auto ans = NTT::pow(v, n); now = 1; rep2(i, 1, n - 1) now *= i; cout << ans[2 * n - 2] * now / mint(n).pow(n - 2) << endl; }