#include <bits/stdc++.h>
#define ll long long
#define INF 1000000005
#define MOD 924844033
#define EPS 1e-10
#define rep(i,n) for(int i=0;i<(int)(n);++i)
#define rrep(i,n) for(int i=(int)(n)-1;i>=0;--i)
#define srep(i,s,t) for(int i=(int)(s);i<(int)(t);++i)
#define each(a,b) for(auto& (a): (b))
#define all(v) (v).begin(),(v).end()
#define len(v) (int)(v).size()
#define zip(v) sort(all(v)),v.erase(unique(all(v)),v.end())
#define cmx(x,y) x=max(x,y)
#define cmn(x,y) x=min(x,y)
#define fi first
#define se second
#define pb push_back
#define show(x) cout<<#x<<" = "<<(x)<<endl
#define spair(p) cout<<#p<<": "<<p.fi<<" "<<p.se<<endl
#define sar(a,n) cout<<#a<<":";rep(pachico,n)cout<<" "<<a[pachico];cout<<endl
#define svec(v) cout<<#v<<":";rep(pachico,v.size())cout<<" "<<v[pachico];cout<<endl
#define svecp(v) cout<<#v<<":";each(pachico,v)cout<<" {"<<pachico.first<<":"<<pachico.second<<"}";cout<<endl
#define sset(s) cout<<#s<<":";each(pachico,s)cout<<" "<<pachico;cout<<endl
#define smap(m) cout<<#m<<":";each(pachico,m)cout<<" {"<<pachico.first<<":"<<pachico.second<<"}";cout<<endl

using namespace std;

typedef pair<int,int> P;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<double> vd;
typedef vector<P> vp;
typedef vector<string> vs;

const int MAX_N = 2005;

int dp[2][MAX_N][MAX_N][2];
int sm[MAX_N][MAX_N];

ll inv[MAX_N],fac[MAX_N],finv[MAX_N];

void make()
{
	fac[0] = fac[1] = 1;
	finv[0] = finv[1] = 1;
	inv[1] = 1;
	for(int i=2;i<MAX_N;i++){
		inv[i] = MOD - inv[MOD%i] * (MOD/i) % MOD;
		fac[i] = fac[i-1] * (ll) i % MOD;
		finv[i] = finv[i-1] * inv[i] % MOD;
	}
}

ll comb(int a,int b)
{
	if(a<b){
		return 0;
	}
	return fac[a] * (finv[b] * finv[a-b] % MOD) % MOD;
}

ll add(ll x,ll y)
{
    return (x + y)%MOD;
}

ll sub(ll x,ll y)
{
    return (x+MOD-y)%MOD;
}

ll mul(ll x,ll y)
{
    return x*y%MOD;
}

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n,K;
    cin >> n >> K;
    make();
    dp[0][0][0][0] = 1;
    dp[1][0][0][1] = 1;
    rep(i,n){
        rep(j,i+1){
            rep(k,2){
                dp[k][i+1][j][0] = add(dp[k][i+1][j][0],add(dp[k][i][j][0],dp[k][i][j][1]));
                dp[k][i+1][j+1][0] = add(dp[k][i+1][j+1][0],dp[k][i][j][0]);
                dp[k][i+1][j+1][1] = add(dp[k][i+1][j+1][1],add(dp[k][i][j][0],dp[k][i][j][1]));
            }
        }
    }
    sm[0][0] = 1;
    int mx = 0;
    rep(i,min(n,2*K)){
        int cnt = 0;
        int l = (n-i-1)/(2*K)+1;
        rep(j,(n-i-1)/(2*K)+2){
            if(i+(2*l-1)*K < n){
                rep(k,min(mx+1,n-j+1)){
                    cmx(cnt,j+k);
                    sm[i+1][j+k] = add(sm[i+1][j+k],mul(sm[i][k],add(dp[i<K][l][j][0],dp[i<K][l][j][1])));
                }
            }else{
                rep(k,min(mx+1,n-j+1)){
                    cmx(cnt,j+k);
                    sm[i+1][j+k] = add(sm[i+1][j+k],mul(sm[i][k],dp[i<K][l][j][0]));
                }
            }
        }
        cmx(mx,cnt);
    }
    // show(dp[2][1][0]);
    // show(sm[1][1]);
    // cout << sm[min(n,2*K)][2] << "\n";
    ll ans = 0;
    rep(i,n+1){
        if(i % 2){
            ans = sub(ans,mul(sm[min(n,2*K)][i],fac[n-i]));
        }else{
            ans = add(ans,mul(sm[min(n,2*K)][i],fac[n-i]));
        }
    }
    cout << ans << "\n";
    return 0;
}


Measured memory_bytes: 77952