#include <algorithm>
#include <cstdio>
#include <cstring>

typedef long long LL;

const int MAXN = 2000;
const int MOD = 924844033;

int N, K;
int Fac[MAXN + 5];

int Cnt;
bool Begin[MAXN * 2 + 5];

int Dp[MAXN * 2 + 5][MAXN * 2 + 5][2];

int main() {
	scanf("%d%d", &N, &K);
	Fac[0] = 1;
	for (int i = 1; i <= N; i++)
		Fac[i] = (LL)Fac[i - 1] * i % MOD;
	for (int i = 1; i <= K; i ++) {
		for (int j = i; j <= N; j += K)
			Begin[++Cnt] = (j == i);
		for (int j = i; j <= N; j += K)
			Begin[++Cnt] = (j == i);
	}
	Dp[0][0][0] = 1;
	for (int i = 1; i <= 2 * N; i++) {
		for (int j = 0; j <= i; j++) {
			Dp[i][j][0] = (Dp[i - 1][j][0] + Dp[i - 1][j][1]) % MOD;
			if (!Begin[i] && j)
				Dp[i][j][1] = Dp[i - 1][j - 1][0];
		}
	}
	int Ans = 0;
	for (int i = 0; i <= N; i++) {
		int tmp = (Dp[N * 2][i][0] + Dp[N * 2][i][1]) % MOD;
		if (i & 1)
			tmp = -tmp;
		Ans = ((Ans + (LL)tmp * Fac[N - i] % MOD) % MOD + MOD) % MOD;
	}
	printf("%d", Ans);
}