#include using namespace std; #include using mint = atcoder::modint998244353; #define rep(i, l, r) for (int i = (int)(l); i<(int)(r); i++) #define ll long long int main() { int N; cin >> N; if (N < 4) { cout << 0 << endl; return 0; } vector fac(N+1); fac[0] = 1; rep(i, 1, N+1) fac[i] = fac[i-1]*i; mint ans = 0; rep(h, 2, N-1) { int w = N-h; mint inv = fac[h-2]; inv *= fac[w-2]; inv *= h; inv *= w; inv *= (h+w-1); mint plus = fac[N]; plus/=inv; ans += plus*plus; } cout << ans.val() << endl; }