#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include //#include using namespace std; //using namespace atcoder; #define repr(i, a, b) for (int i = (int)(a); i < (int)(b); i++) #define rep(i, n) repr(i, 0, n) #define INF 2e9 //#define MOD 1000000007 #define MOD 998244353 #define LINF (long long)4e18 #define jck 3.141592 #define PI acos(-1.0) const double EPS = 1e-10; using ll = long long; using Pi = pair; using Pl = pair; //using mint = modint998244353; int dh[] = {-1,0,1,0}; int dw[] = {0,1,0,-1}; vector> factorize(ll n){ vector> div; ll d = n; for(ll i = 2; i*i <= n; i++){ pair p; if(d % i == 0){ p = make_pair(i,0); while(d % i == 0){ d /= i; p.second++; } div.emplace_back(p); } } if(d != 1) div.emplace_back(d,1); return div; } ll modpow(ll a, ll n, ll m){ if(n == 0) return 1; ll half = modpow(a,n/2,m); ll res = half * half % m; if(n & 1) res = res * (a%m) % m; return res; } int main(){ int n; cin >> n; vector cnt(n+1); ll ans = 1; for(int i = 1; i <= n-i; i++){ auto div1 = factorize(i); auto div2 = factorize(n-i); map cnt2; for(auto [u,v] : div1) cnt2[u] += v; for(auto [u,v] : div2) cnt2[u] += v; for(auto [u,v] : cnt2){ if(cnt[u] < cnt2[u]){ ans *= modpow(u,cnt2[u]-cnt[u],MOD); ans %= MOD; cnt[u] = cnt2[u]; } } //cout << i << " " << ans << endl; } cout << ans << endl; }