#include<bits/stdc++.h>
using namespace std;
int n,k,t,a[4010],vis[4010][2];
long long fac[4010],g[4010],ans,f[4010][4010][2],p=924844033;
int main() {
//    freopen("permutation.in","r",stdin);
//    freopen("permutation.out","w",stdout);
    cin>>n>>k;
    for(int i=1; i<=n; i++)
        for(int j=0; j<=1; j++)
            if(!vis[i][j]) {
                int x=i,y=j,len=0;
                while(x<=n) {
                    vis[x][y]=1;
                    len++;
                    x+=k;
                    y^=1;
                }t+=len;
                a[t]=1;
            }
    f[1][0][0]=1;
    for(int i=1; i<=t; i++)
        for(int j=0; j<=n; j++) {
            f[i+1][j][0]=(f[i][j][0]%p+f[i][j][1]%p)%p;
            if(!a[i]) f[i+1][j+1][1]=f[i][j][0];
        }
    for(int i=1; i<=n; i++) g[i]=(f[t][i][0]%p+f[t][i][1]%p)%p;
    fac[0]=1;
    for(int i=1; i<=n; i++) fac[i]=fac[i-1]%p*i%p;
    ans=fac[n]%p;
    for(int i=1,j=-1; i<=n; i++,j=-j) ans=(ans%p+p+j%p*g[i]%p*fac[n-i]%p)%p;
    printf("%lld\n",ans%p);
    return 0;
}

