#include using namespace std; #define ll long long #define ld long double #define REP(i,m,n) for(int i=(int)(m); i<(int)(n); i++) #define rep(i,n) REP(i,0,n) #define RREP(i,m,n) for(int i=(int)(m); i>=(int)(n); i--) #define rrep(i,n) RREP(i,(n)-1,0) #define all(v) v.begin(), v.end() #define endk '\n' const int inf = 1e9+7; const ll longinf = 1LL<<60; const ll mod = 998244353; const ld eps = 1e-10; template inline void chmin(T1 &a, T2 b){if(a>b) a=b;} template inline void chmax(T1 &a, T2 b){if(a 0) { if(N % 2 == 1) (ans *= tmp) %= mod; (tmp *= tmp) %= mod; N /= 2; } return ans; } template vector smallest_prime_factors(T n) { vector spf(n + 1); for(int 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; } } } } return spf; } template vector factorization(T x, vector& spf) { vector ret; while(x != 1) { ret.push_back(spf[x]); x /= spf[x]; } sort(ret.begin(), ret.end()); return ret; } int main() { cin.tie(0); ios::sync_with_stdio(false); int MAX = 1000001; auto spf = smallest_prime_factors(MAX); int n; cin >> n; map cnt; for(int i=1; i<=n-i; i++) { map tmp; for(int a: factorization(i, spf)) { tmp[a]++; } for(int a: factorization(n-i, spf)) { tmp[a]++; } for(auto [a, v]: tmp) { chmax(cnt[a], v); } } ll ans = 1; for(auto [a, v]: cnt) (ans *= modpow(a, v)) %= mod; cout << ans << endk; return 0; }