#include <cstdio>
#include <algorithm>
#define ll long long
#define rep(i,j,k) for (i=j;i<=k;i++)
#define down(i,j,k) for (i=j;i>=k;i--)
using namespace std;
const int N=2e3+5,mod=924844033;
int n,k,i,j,l,t,p,sgn;
ll ans,fac[N],g[N],h[N],f[N][N][2];
int main()
{
//	freopen("count.in","r",stdin);
//	freopen("count.out","w",stdout);
	scanf("%d%d",&n,&k); fac[0]=1;
	fac[1]=1; rep(i,2,n) fac[i]=fac[i-1]*i%mod;
	ans=fac[n];
	f[0][0][1]=1;
	rep(i,1,n)
		rep(j,0,i/2)
		{
			f[i][j][0]=(f[i-1][j][1]+f[i-1][j][0])%mod; 
			if (j>0) f[i][j][1]=f[i-1][j-1][0];
		}
	h[0]=1;
	rep(i,1,min(n,k*2))
	{
		j=i; l=0;
		if (j-k>0) l++;
		while (j<=n)
		{
			l++;
			j+=k;
		}
		rep(j,0,n) g[j]=h[j],h[j]=0;
		rep(j,0,n)
			rep(t,0,min(j,l))
				rep(p,0,1)
					h[j]=(h[j]+g[j-t]*f[l][t][p])%mod;
	}
	sgn=-1;
	rep(i,1,n)
	{
		ans=(ans+sgn*h[i]*fac[n-i])%mod;
		sgn*=(-1);
	}
	ans=(ans+mod)%mod;
	printf("%I64d\n",ans);
	return 0;
}