#include using namespace std; #define fi first #define se second #define pb push_back using vi = vector ; using ll = long long; using pii = pair ; const ll mod = 998244353; //~ const ll mod = 1e9 + 7; ll qpow(ll a, ll b, ll m = mod) { ll r = 1, t = a; for(; b; b /= 2) { if(b & 1) r = r * t % m; t = t * t % m; } return r; } const int N = 1e5 + 11; ll inv[N], fac[N], ifac[N]; int main() { inv[1] = 1; for(int i = 2; i < N; i ++) inv[i] = (mod - mod / i) * inv[mod % i] % mod; fac[0] = ifac[0] = 1; for(int i = 1; i < N; i ++) { fac[i] = i * fac[i - 1] % mod; ifac[i] = inv[i] * ifac[i - 1] % mod; } ios :: sync_with_stdio(0); int n; cin >> n; ll ans = 0; if(n >= 4) { for(int i = 2; i <= n - 2; i ++) { int a = i, b = n - i; ll t = fac[n]; t = t * ifac[a - 2] % mod; t = t * ifac[b - 2] % mod; t = t * inv[n - 1] % mod * inv[a] % mod * inv[b] % mod; //~ cout << a << ' ' << b << ' ' << t << '\n'; ans += t * t % mod; ans %= mod; } } cout << ans << '\n'; }