#include <iostream> #include <vector> #include <map> using namespace std; using ll = long long int; const ll MOD = 998244353; ll modpow(ll a, ll x){ ll ans = 1; while(x > 0){ if(x & 1){ ans *= a; ans %= MOD; } a *= a; a %= MOD; x >>= 1; } return ans; } int main(){ int n; cin >> n; vector<int> isprime(n+1); for(int i = 0; i <= n; i++) isprime[i] = i; for(int i = 2; i <= n; i++){ if(isprime[i] == i){ for(int j = 2; i*j <= n; j++){ if(isprime[i*j] > i) isprime[i*j] = i; } } } vector<int> cnt(n+1, 0); for(int i = 1; i < n; i++){ int k = i; map<int, int> fac; while(k > 1){ if(fac.count(isprime[k])) fac[isprime[k]]++; else fac[isprime[k]] = 1; k /= isprime[k]; } k = n-i; while(k > 1){ if(fac.count(isprime[k])) fac[isprime[k]]++; else fac[isprime[k]] = 1; k /= isprime[k]; } for(auto &p: fac){ if(cnt[p.first] < p.second) cnt[p.first] = p.second; } } ll ans = 1; for(int i = 2; i < n; i++){ ans *= modpow(i, cnt[i]); ans %= MOD; } cout << ans << endl; return 0; }