#include using namespace std; typedef long long ll; const int N = 1e5 + 5 , MOD = 998244353; int Qpow(ll x , ll p) { ll res = 1; x %= MOD , p %= MOD - 1; if(p < 0)p += MOD - 1; for(; p ; p >>= 1 , x = x * x % MOD) if(p & 1)res = res * x % MOD; return res; } int fac[N] , ifac[N] , inv[N]; void Init(int n) { fac[0] = ifac[0] = 1; for(int i = 1 ; i <= n ; i++) fac[i] = (ll)fac[i - 1] * i % MOD; ifac[n] = Qpow(fac[n] , MOD - 2); for(int i = n - 1 ; i >= 1 ; i--) ifac[i] = (ll)ifac[i + 1] * (i + 1) % MOD; for(int i = 1 ; i <= n ; i++) inv[i] = (ll)ifac[i] * fac[i - 1] % MOD; } int C(int n , int m) { if(n < m || m < 0)return 0; return (ll)fac[n] * ifac[m] % MOD * ifac[n - m] % MOD; } int main() { ios::sync_with_stdio(0); cin.tie(0) , cout.tie(0); int n; cin >> n; Init(n); int ans = 0; for(int a = 2 ; a <= n - 2 ; a++) { int b = n - a; ll t = ((ll)inv[a] * inv[b] % MOD) * ((ll)ifac[a - 2] * ifac[b - 2] % MOD) % MOD * ((ll)fac[n] * inv[n - 1] % MOD) % MOD; ans = (ans + t * t) % MOD; } cout << ans << "\n"; return 0; }