#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>

using namespace std;
using namespace __gnu_pbds;

template<class T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

template<class T, class U>
void ckmin(T &a, U b)
{
    if (a > b) a = b;
}

template<class T, class U>
void ckmax(T &a, U b)
{
    if (a < b) a = b;
}

#define MP make_pair
#define PB push_back
#define LB lower_bound
#define UB upper_bound
#define fi first
#define se second
#define SZ(x) ((int) (x).size())
#define ALL(x) (x).begin(), (x).end()
#define FOR(i, a, b) for (auto i = (a); i < (b); i++)
#define FORD(i, a, b) for (auto i = (a) - 1; i >= (b); i--)

typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<pii> vpi;
typedef vector<pll> vpl;

const int MAXN = 2013;
const int INF = 924844033;

int add(int a, int b)
{
    a += b; if (a >= INF) a -= INF; return a;
}
int mul(int a, int b)
{
    return (ll) a * b % INF;
}
int sub(int a, int b)
{
    a -= b; if (a < 0) a += INF; return a;
}
int pwr(int a, int b)
{
    int res = 1;
    while(b > 0)
    {
        if (b & 1) res = mul(res, a);
        b >>= 1;
        a = mul(a, a);
    }
    return res;
}
int inv(int a)
{
    return pwr(a, INF - 2);
}
int dvd(int a, int b)
{
    return mul(a, inv(b));
}

int N, K;
int dp[MAXN][MAXN][2]; //# of matchings of length i on a path of length j, given the most recent one was used/unused.
int res[MAXN], tmp[MAXN], fact[MAXN];
int ans;

int32_t main()
{
    cout << fixed << setprecision(12);
    cerr << fixed << setprecision(4);
    ios_base::sync_with_stdio(false); cin.tie(0);
    cin >> N >> K;
    fact[0] = 1;
    FOR(i, 1, N + 1)
    {
        fact[i] = mul(fact[i - 1], i);
    }
    dp[0][0][1] = 1;
    dp[1][0][0] = 1;
    FOR(i, 0, N / K + 1)
    {
        FOR(j, 0, i / 2 + 1)
        {
            dp[i + 2][j][0] = add(dp[i + 2][j][0], dp[i][j][0]);
            dp[i + 2][j][0] = add(dp[i + 2][j][0], dp[i][j][1]);
            dp[i + 2][j + 1][0] = add(dp[i + 2][j + 1][0], dp[i][j][0]);
            dp[i + 2][j + 1][1] = add(dp[i + 2][j + 1][1], dp[i][j][0]);
            dp[i + 2][j + 1][1] = add(dp[i + 2][j + 1][1], dp[i][j][1]);
        }
    }
    res[0] = 1;
    FOR(i, 0, K)
    {
        int len = N / K + (i < N % K);
        fill(tmp, tmp + N + 1, 0);
        // cerr << "path " << len << endl;
        FOR(j, 0, N + 1)
        {
            if (res[j] == 0) continue;
            FOR(k, 0, N / K + 2)
            {
                tmp[j + k] = add(tmp[j + k], mul(res[j], add(dp[len][k][0], dp[len][k][1])));
            }
        }
        fill(res, res + N + 1, 0);
        FOR(j, 0, N + 1)
        {
            if (tmp[j] == 0) continue;
            FOR(k, 0, N / K + 2)
            {
                res[j + k] = add(res[j + k], mul(tmp[j], add(dp[len][k][0], dp[len][k][1])));
            }
        }
    }
    FOR(i, 0, N + 1)
    {
        int co = mul(res[i], fact[N - i]);
        if (i & 1)
        {
            ans = sub(ans, co);
        }
        else
        {
            ans = add(ans, co);
        }
    }
    cout << ans << '\n';
    return 0;
}


Measured memory_bytes: 30080