#include const int Mod = 998244353; long long fact[1000001], fact_inv[1000001]; long long div_mod(long long x, long long y, long long z) { if (x % y == 0) return x / y; else return (div_mod((1 + x / y) * y - x, (z % y), y) * z + x) / y; } long long combination(int n, int k) { if (k < 0 || n < k) return 0; return fact[n] * fact_inv[k] % Mod * fact_inv[n-k] % Mod; } int main() { int N, P; scanf("%d %d", &N, &P); int i; for (i = 1, fact[0] = 1; i <= N; i++) fact[i] = fact[i-1] * i % Mod; for (i = N - 1, fact_inv[N] = div_mod(1, fact[N], Mod); i >= 0; i--) fact_inv[i] = fact_inv[i+1] * (i + 1) % Mod; long long dp[200001]; for (i = 1, dp[0] = 1; i <= N; i++) { dp[i] = dp[i-1]; if (i >= P) { dp[i] += dp[i-P] * combination(i - 1, P - 1) % Mod * fact[P-1] % Mod; if (dp[i] >= Mod) dp[i] -= Mod; } } printf("%lld\n", (fact[N] - dp[N] + Mod) % Mod); fflush(stdout); return 0; }