#include using namespace std; #define REP(i,n) for (int i = 0; i < (n); ++i) #define DREP(i,s,n) for(int i = (s); i < (n); i++) template inline bool chmin(T& a, T b) {if (a > b) {a = b;return true;}return false;} template inline bool chmax(T& a, T b) {if (a < b) {a = b;return true;}return false;} using ll = long long; using P = pair; using Pl = pair; using veci = vector; using vecl = vector; using vecveci = vector>; using vecvecl = vector>; const int MOD = 998244353; const double pi = acos(-1); ll gcd(ll a, ll b) {if(b == 0) return a; else return gcd(b,a%b);} ll lcm(ll a, ll b) {return a*b/gcd(a,b);} ll modpow(ll a, ll n) { if(n == 0) return 1; auto t = modpow(a,n/2); t = t*t; t %= MOD; if(n & 1) { t *= a; t %= MOD; } return t; } template struct PrimeFact { vector spf; PrimeFact(T N) { init(N); } void init(T N) { // 前処理。spf を求める spf.assign(N + 1, 0); for (T i = 0; i <= N; i++) spf[i] = i; for (T i = 2; i * i <= N; i++) { if (spf[i] == i) { for (T j = i * i; j <= N; j += i) { if (spf[j] == j) { spf[j] = i; } } } } } map get(T n) { // nの素因数分解を求める map m; while (n != 1) { m[spf[n]]++; n /= spf[n]; } return m; } }; int main() { ll N; cin >> N; map LCM; PrimeFact fp(1000010); for(ll i = 1; i <= N-1; i++) { map mp; for(auto e : fp.get(i)) mp[e.first] += e.second; for(auto e : fp.get(N-i)) mp[e.first] += e.second; for(auto e : mp) { //cout << e.first << " " << e.second << endl; LCM[e.first] = max(LCM[e.first],e.second); } } ll ans = 1; for(auto e : LCM) { ans *= modpow(e.first, e.second); ans %= MOD; } cout << ans << endl; return 0; }