n,p = map(int,input().split())

class comb():
    def __init__(self,n,mod):
        self.fact = [0] * (n+1)
        self.fact_inv = [0] * (n+1)
        self.mod = mod

        self.fact[1] = 1
        self.fact_inv[1] = pow(1,mod-2,mod)
        self.fact[0] = 1
        self.fact_inv[0] = 1

        for i in range(2,n+1):
            self.fact[i] = (self.fact[i-1] * i) % mod
            self.fact_inv[i] = (self.fact_inv[i-1] * pow(i,mod-2,mod)) % mod
        
    def ncr(self,n,r):
        return (self.fact[n] * self.fact_inv[r] * self.fact_inv[n-r]) % self.mod

c = comb(2*10**5,998244353)
ans = 0
temp = 0
x = n
for i in range(n):
    if i == 0:
        temp = 1
        ans += temp
        continue
    if n - p * (i - 1) < p:
        break
    temp *= c.ncr(n-p*(i-1),p)
    temp *= c.fact[p-1]
    temp *= pow(i,998244351,998244353)
    temp %= 998244353
    ans += temp
    ans %= 998244353
print((c.fact[n]-ans) % 998244353)