#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);} map f(ll N) { map mp; for(ll i = 2; i*i <= N; i++) { if(N%i == 0) { ll ex = 0; while(N%i == 0) { ex++; N /= i; } mp[i] += ex; } } if(N!=1) mp[N]++; return mp; } 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; } int main() { ll N; cin >> N; map LCM; for(ll i = 1; i <= N-1; i++) { map mp; for(auto e : f(i)) mp[e.first] += e.second; for(auto e : f(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; }