#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include //eolibraries #define lnf 3999999999999999999 #define inf 999999999 #define PI 3.14159265359 #define endl "\n" #define fi first #define se second #define pb push_back #define eb emplace_back #define ll long long #define all(c) (c).begin(),(c).end() #define sz(c) (ll)(c).size() #define mkp(a,b) make_pair(a,b) #define make_unique(a) sort(all(a)),a.erase(unique(all(a)),a.end()) #define rsz(a,n) a.resize(n) #define pii pair #define rep(i,n) for(int i = 0 ; i < n ; i++) #define drep(i,n) for(int i = n-1 ; i >= 0 ; i--) #define crep(i,x,n) for(int i = x ; i < n ; i++) #define vi vector #define vec(s) vector #define rsz(a,n) a.resize(n) #define rszv(a,n,v) a.resize(n,v) #define fcin ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0); //eodefine const ll max_n = 1000002; using namespace std; ll mod=998244353; //modarth ll binpow(ll a, ll b) { a %= mod; ll res = 1; while (b) { if (b%2) res = res * a % mod; a = a * a % mod; b /= 2; } return res % mod; } ll prod(ll a , ll b){ a%=mod; b%=mod; return ((a*b)%mod); } ll add(ll a , ll b){ a%=mod; b%=mod; return (a+b)%mod; } //modarth vec(pii) primefact[max_n+10]; void fprimefact() { vi p; p.resize(max_n+10,0); for(int i = 2 ; i*i < max_n ; i++){ if(p[i] == 0) { for(int j = i*i ; j <= max_n ; j += i) p[j] = i; } } for(int i=2;i<=max_n;i++) if(p[i]==0)p[i]=i; for(int i = 2 ; i <= max_n ; i++) { int x=i,cnt=0; while(x!=1) { int y=p[x],pup=y; if(y==0) break; cnt=0; while(y!=0 and x%y==0) {x/=y;cnt++;} primefact[i].pb({pup,cnt}); } } } int nmp[max_n],mp[max_n]; void merg(int x,int y) { for(auto p:primefact[x]) { nmp[p.fi]=0; } for(auto p:primefact[y]) { nmp[p.fi]=0; } for(auto p:primefact[x]) { nmp[p.fi]=p.se; } for(auto p:primefact[y]) { nmp[p.fi]+=p.se; } for(auto p :primefact[x]) mp[p.fi]=max(mp[p.fi],nmp[p.fi]); for(auto p :primefact[y]) mp[p.fi]=max(mp[p.fi],nmp[p.fi]); } int main(){ fcin; fprimefact(); int n; cin>>n; crep(i,1,n) { if(i>n-i) break; merg(i,n-i); } ll ans=1; crep(i,1,max_n-3){ if(mp[i]==0)continue; mp[i]=binpow(i,mp[i]); } crep(i,1,max_n-3){ if(mp[i]==0)continue; ans=prod(ans,mp[i]); } cout << ans << "\n"; /* */ return 0; }