#include<iostream>
#include<cctype>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<cmath>
#define N 4100
#define inf 1e9+7
#define ll long long
#define mo 924844033
using namespace std;
inline int read()
{
    int x=0,flag=1;
    char ch=0;
    while(!isdigit(ch)){ch=getchar();if(ch=='-')flag=-1;}
    while(isdigit(ch)) {x=(x<<3)+(x<<1)+ch-'0';ch=getchar();}
    return x*flag;
}
ll fac[N];
int flag[N],dp[N][N][2];
int main()
{
	int n,k,i,j,o,cnt=0;
	ll g,ans=1;
	n=read();
	k=read();
	fac[0]=1;
	for(i=1;i<=n;i++)
	fac[i]=(fac[i-1]*i)%mo;
	ans=fac[n];
	for(i=1;i<=k;i++)
	{
		for(o=1;o<=2;o++)//加减各加一遍
		  for(j=i;j<=n;j+=k)
		  {
			  cnt++;
			  if(i!=j)flag[cnt]=1;
		  }
	}
	dp[0][0][0]=1;
	for(i=1;i<=2*n;i++)
	{
		for(j=0;j<=n;j++)
		{
			dp[i][j][0]=(dp[i-1][j][0]+dp[i-1][j][1])%mo;
			if(flag[i]&&j)dp[i][j][1]=dp[i-1][j-1][0];
		}
	}
	for(i=1;i<=n;i++)
	{
		g=( (dp[2*n][i][0]+dp[2*n][i][1])%mo * fac[n-i] )%mo;
		if(i%2)  ans=(ans-g+mo)%mo;
		else  ans=(ans+g)%mo;
	}
	printf("%lld",ans);
	return 0;
}