#include #define int long long #define F(i, a, b) for (int i = (a); i <= (b); i++) #define dF(i, a, b) for (int i = (a); i >= (b); i--) using namespace std; typedef long long ll; typedef pair pii; const int N = 200005, M = (N << 1), inf = 1e16, mod = 998244353; int n, fac[N], ifc[N], inv[N]; signed main() { ios_base::sync_with_stdio(0); cin.tie(0), cout.tie(0); fac[0] = ifc[0] = inv[0] = fac[1] = ifc[1] = inv[1] = 1; const int maxn = 100000; for (int i = 2; i <= maxn; ++i) { fac[i] = 1ll * fac[i - 1] * i % mod; inv[i] = 1ll * inv[mod % i] * (mod - mod / i) % mod; ifc[i] = 1ll * ifc[i - 1] * inv[i] % mod; } cin >> n; int ans = 0; F(i, 2, n - 2) { int x = fac[n] * inv[n - 1] % mod * inv[i] % mod * inv[n - i] % mod; x = x * ifc[i - 2] % mod * ifc[n - i - 2] % mod; ans = (ans + x * x % mod) % mod; } cout << ans << endl; return 0; } // g++ a.cpp -o a -O2 -std=c++14 -fsanitize=undefined,address