#include<map>
#include<set>
#include<stack>
#include<queue>
#include<cmath>
#include<cstring>
#include<climits>
#include<cstdio>
#include<iostream>
#include<algorithm>
using namespace std;
#define LL long long
//#define getchar() (p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1 << 21, stdin), p1 == p2) ? EOF : *p1++)
//char buf[(1 << 21) + 1], *p1 = buf, *p2 = buf;
inline int read() {
	bool f=0;int x=0;char c=getchar();
	while(c<'0'||'9'<c){if(c==EOF)exit(0);if(c=='-')f=1;c=getchar();}
	while('0'<=c&&c<='9') x=(x<<3)+(x<<1)+(c^48),c=getchar();
	return !f?x:-x;
}
#define MAXN 2000
#define INF 0x3f3f3f3f
#define Mod 924844033
bool cut[2*MAXN+5];
LL f[2*MAXN+5][2*MAXN+5][2],fac[MAXN+5];
int main(){
	fac[0]=1;
	for(int i=1;i<=MAXN;i++)
		fac[i]=fac[i-1]*i%Mod;
	int n=read(),k=read(),cnt=0;
	for(int i=1;i<=k;i++)
		for(int t=0;t<=1;t++)
			for(int j=i;j<=n;j+=k){
				++cnt;
				if(j==i)
					cut[cnt]=1;
			}
	f[1][0][0]=1;
	for(int i=2;i<=2*n;i++)
		for(int j=0;j<=n;j++){
			f[i][j][0]=(f[i-1][j][1]+f[i-1][j][0])%Mod;
			if((!cut[i])&&j)
				f[i][j][1]=f[i-1][j-1][0];
		}
	LL ans=0;
	for(int j=0;j<=n;j++)
		ans=(ans+(j&1?-1:1)*(f[2*n][j][0]+f[2*n][j][1])*fac[n-j]%Mod)%Mod;
	ans=(ans+Mod)%Mod;
	printf("%lld\n",ans);
	return 0;
}
