#include <stdio.h>  
#include <algorithm>  
#include <assert.h>
#include <bitset>
#include <cmath>  
#include <complex>  
#include <deque>  
#include <functional>  
#include <iostream>  
#include <limits.h>  
#include <map>  
#include <math.h>  
#include <queue>  
#include <deque>
#include <set>  
#include <stdlib.h>  
#include <string.h>  
#include <string>  
#include <time.h>  
#include <unordered_map>  
#include <unordered_set>  
#include <vector>  
#include <chrono>
#include <random>
#include <time.h>
#include <fstream>
#define ll long long
#define rep2(i,a,b) for(ll i=a;i<=b;++i)
#define rep(i,n) for(ll i=0;i<n;i++)
#define rep3(i,a,b) for(ll i=a;i>=b;i--)
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pq priority_queue<int>
#define pqg priority_queue<int,vector<int>,greater<int>>
#define pb push_back
#define vec vector<int>
#define vecll vector<ll>
#define vecpii vector<pii>
#define endl "\n"
#define all(c) begin(c),end(c)
using namespace std;
int in() {int x;scanf("%d",&x);return x;}
ll lin() {ll x;scanf("%lld",&x);return x;}
void print(vec v){for(auto e:v)cout<<e<<" ";cout<<endl;}
void print(vecll v){for(auto e:v)cout<<e<<" ";cout<<endl;}
void print(map<int,int> mp){for(auto e:mp)cout<<e.first<<" "<<e.second<<endl;cout<<endl;}


#define INF 1e9+7
#define LLINF 1e18+7
#define N 250000

const ll MOD=924844033;

template <std::uint_fast64_t Modulus> class modint {
  using u64 = std::uint_fast64_t;

public:
  u64 a;

  constexpr modint(const u64 x = 0) noexcept : a(x % Modulus) {}
  constexpr u64 &value() noexcept { return a; }
  constexpr const u64 &value() const noexcept { return a; }
  constexpr modint operator+(const modint rhs) const noexcept {
    return modint(*this) += rhs;
  }
  constexpr modint operator-(const modint rhs) const noexcept {
    return modint(*this) -= rhs;
  }
  constexpr modint operator*(const modint rhs) const noexcept {
    return modint(*this) *= rhs;
  }
  constexpr modint operator/(const modint rhs) const noexcept {
    return modint(*this) /= rhs;
  }
  constexpr modint &operator+=(const modint rhs) noexcept {
    a += rhs.a;
    if (a >= Modulus) {
      a -= Modulus;
    }
    return *this;
  }
  constexpr modint &operator-=(const modint rhs) noexcept {
    if (a < rhs.a) {
      a += Modulus;
    }
    a -= rhs.a;
    return *this;
  }
  constexpr modint &operator*=(const modint rhs) noexcept {
    a = a * rhs.a % Modulus;
    return *this;
  }
  constexpr modint &operator/=(modint rhs) noexcept {
    u64 exp = Modulus - 2;
    while (exp) {
      if (exp % 2) {
        *this *= rhs;
      }
      rhs *= rhs;
      exp /= 2;
    }
    return *this;
  }
};
#define mint modint<MOD>
main(){
    int n,k;cin>>n>>k;
    // vec v;
    // rep2(i,1,n)v.pb(i);
    // ll ANS=0;
    // do{
    //     bool flag=true;
    //     rep(i,n){
    //         if(abs(v[i]-i-1)==k)flag=false;
    //     }
    //     ANS+=flag;
    // }while(next_permutation(all(v)));
    // cout<<ANS<<endl;
    mint ans=0;
    vector<vector<mint> > dp(2*n+1,vector<mint> (2*n+1));
    dp[0][0]=1;

    rep2(i,0,k-1){
        int size=(n-i-1)/k;
        vector<vector<mint> > tmp(size+3,vector<mint>(size+2));
        tmp[0][0]=1;
        rep(j,size+1){
            rep(l,size+1){
                tmp[j+2][l+1]+=tmp[j][l];
                tmp[j+1][l]+=tmp[j][l];
            }
        }
        rep(j,n){
            rep(l,size+1){
                dp[i*2+1][j+l]+=dp[i*2][j]*tmp[size+1][l];
            }
        }
        rep(j,n)rep(l,size+1)dp[i*2+2][j+l]+=dp[i*2+1][j]*tmp[size+1][l];
    }
    mint pro=1;
    rep3(i,n,0){
        // cout<<dp[k*2][i].a<<endl;
        if(i%2)
        ans-=dp[k*2][i]*pro;
        else
        ans+=dp[k*2][i]*pro;
        pro*=(n-i+1);
    }
    cout<<ans.a<<endl;
}

Measured memory_bytes: 156800