#include #define ll long long using namespace std; const int N = 1e6 + 10,p = 998244353; ll n,s,ans,fc[N],iv[N],inv[N]; ll sqr(ll x){return x * x % p;} int main() { // freopen("input.in","r",stdin); cin >> n; fc[0] = fc[1] = iv[0] = iv[1] = inv[0] = inv[1] = 1; for(int i = 2;i <= n;i++) fc[i] = fc[i - 1] * i % p,iv[i] = iv[p % i] * (p - p / i) % p,inv[i]= inv[i - 1] * iv[i] % p; for(int i = 2;i <= n - 2;i++) ans += sqr(fc[n] * inv[i - 2] % p * inv[n - i - 2] % p * iv[i] % p * iv[n - i] % p * iv[n - 1] % p),ans >= p ? ans -= p : 0; cout << ans << '\n'; return 0; }