#include // #include using namespace std; // using namespace atcoder; using ll = long long; using ull = unsigned long long; using P = pair; #define rep(i,n) for(ll i = 0;i < (ll)n;i++) #define ALL(x) (x).begin(),(x).end() #define MOD 1000000007 vector v(2000000,0); vector sieve(){ v[0] = 1;v[1] = 1; vector res; for(int i = 2;i <= 1000000;i++){ if(v[i])continue; res.push_back(i); for(int j = i;j <= 1000000;j+=i)v[j] = i; } return res; } void lcm(map &mp,int k){ mp[v[k]]++; if(v[k] == k)return; lcm(mp,k/v[k]); } int mod = 998244353; int main(){ int n; cin >> n; vector p(sieve()); ll x = 0; for(auto au : p){ if(au > n)break; ll k = au; while(k*au <= n)k *= au; if(k*2 > n)x = k; } ll res = 1; map mp; for(int i = 2;i <= n;i++){ if(i == x)continue; map mpp; lcm(mpp,i); for(auto au : mpp)mp[au.first] = max(mp[au.first],au.second); } for(auto &au : mp)while(au.second--)res = res*au.first%mod; cout << res << "\n"; return 0; }