#include using namespace std; #include using namespace atcoder; //using mint = modint1000000007; using mint = modint998244353; std::chrono::time_point start; template bool chmax(T &u, const T z) { if (u < z) {u = z; return true;} else return false; } template bool chmin(T &u, const T z) { if (u > z) {u = z; return true;} else return false; } #define ll long long #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) typedef pair P; ll gcd(ll x, ll y) { return y ? gcd(y, x % y) : x; } ll lcm(ll a, ll b){return a * b / gcd(a, b);} //写し 難しい int main(){ int n; cin >> n; vector kazu(n + 1, -1); int cnt = 0; vector sosu_cnt(n + 1, -1); vector sosu; rep(i,n)kazu[i+1] = i+1; for (int i = 2; i <= n; i++){ if (kazu[i] == i){//一番小さな約数で埋めていく for (int j = i * 2; j <= n; j += i){ kazu[j] = i; } sosu_cnt[i] = cnt; cnt++; sosu.push_back(i); } } vector mx(cnt, 0); for (int i = 1; i < n; i++){ map mp; int a = i; while (a > 1){ mp[sosu_cnt[kazu[a]]]++; a /= kazu[a]; } int b = n - i; while (b > 1){ mp[sosu_cnt[kazu[b]]]++; b /= kazu[b]; } for (auto P : mp){ mx[P.first] = max(mx[P.first], P.second); } } mint ans = 1; rep(i,cnt)rep(j,mx[i]){ ans *= sosu[i]; } cout << ans.val() << endl; }