/*{{{*/
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstring>
#include <unordered_map>
#include <unordered_set>
#include <cassert>
using namespace std;
typedef pair<int, int> PP;
typedef long long LL;
#define pb push_back
#define fr first
#define sc second
#define bitcnt __builtin_popcount
#define all(x) x.begin(), x.end()
inline int ri() {int x; scanf("%d", &x); return x;}
#define rep2(i, n, ...) for (int i = 0; i < (n); i ++) 
#define rep3(i, a, b, ...) for (int i = (a); i < (b); i ++)
#define GET_MACRO(_1, _2, _3, NAME, ...) NAME
#define rep(...) GET_MACRO(__VA_ARGS__, rep3, rep2)(__VA_ARGS__)
#define drep2(i, n, ...) for (int i = (n) - 1; i >= 0; i --)
#define drep3(i, a, b) for (int i = (a) - 1; i >= (b); i --)
#define drep(...) GET_MACRO(__VA_ARGS__, drep3, drep2)(__VA_ARGS__)
template<typename T>inline bool smax(T&a, T b){if(a<b){a=b;return true;}return false;} 
template<typename T>inline bool smin(T&a, T b){if(a>b){a=b;return true;}return false;} 
/*}}}*/

//mod int
struct mint{
  const static long long mod = 924844033;
  long long x;
  mint():x(0){}       
  mint(long long x):x(((x%mod)+mod)%mod){};
  mint operator+=(const mint&a){if((x+=a.x)>=mod) x-=mod; return *this;}
  mint operator-=(const mint&a){if((x+=mod-a.x)>=mod) x-=mod; return *this;}
  mint operator*=(const mint&a){(x*=a.x)%=mod; return *this;}
  mint operator*(const mint&a){return mint(*this)*=a;}
  mint operator-(const mint&a){return mint(*this)-=a;}
  mint operator+(const mint&a){return mint(*this)+=a;}
  template<typename T>mint operator*(const T&a){return mint(*this)*=a;}
  template<typename T>mint operator-(const T&a){return mint(*this)-=a;}
  template<typename T>mint operator+(const T&a){return mint(*this)+=a;}
  template<typename T>friend mint operator*(T x,const mint&m){return mint(x)*=m;}
  template<typename T>friend mint operator-(T x,const mint&m){return mint(x)-=m;}
  template<typename T>friend mint operator+(T x,const mint&m){return mint(x)+=m;}
  bool operator==(const mint& a)const{ return x == a.x;}
  operator long long () const {return x;}
};
mint pw(mint a, long long b){mint res(1);while(b){if(b&1)res*=a;a*=a;b>>=1;}return res;}
mint inv(mint a){return pw(a, mint::mod - 2);}
//mod int


const int maxn = 2010;
////mint p[2000][2000], 
mint p[2][1010][1010][2], q[maxn][maxn], fac[maxn];

int main() {
  #ifdef _TEST_
  freopen("input.txt", "r", stdin);
  //freopen("out.txt", "w", stdout);
  #endif
  rep(pre, 2) {
    rep(i, 1, 1001) {
      p[1][i][1][1] = 1;
      p[1][i][1][0] = 2 * i - 1;
      p[0][i][1][1] = 1;
      p[0][i][1][0] = 2 * i - 2;
      rep(j, 2, i + 1) {
        p[pre][i][j][1] = p[pre][i - 1][j - 1][0] + p[pre][i - 1][j - 1][1];
        p[pre][i][j][0] = p[pre][i - 1][j][0] + p[pre][i - 1][j][1] + p[pre][i - 1][j - 1][0];
      }
    }
  }
  rep(pre, 2) 
    rep(i, 0, 1001) {
      p[pre][i][0][0] = p[pre][i][0][1] = 1;
      rep(j, 1, i + 1) 
        p[pre][i][j][0] = p[pre][i][j][0],
        p[pre][i][j][1] = p[pre][i][j][0] + p[pre][i][j][1];
    }
  int n, m;
  cin >> n >> m;
  vector<vector<int>> v;
  for (int i = 0; i < 2 * m && i < n; i ++) {
    vector<int> tv;
    for (int j = i; j < n; j += 2 * m) tv.pb(j);
    if (tv.size() > 0) v.pb(tv);
  }
  q[0][0] = 1;
  rep(i, 1, v.size() + 1) {
    int pre = v[i - 1][0] >= m;
    int suf = v[i - 1].back() + m < n;
    int sz = v[i - 1].size();
    rep(j, 0, n + 1) {
      for (int k = 0; k <= sz && k <= j; k ++) {
        q[i][j] += q[i - 1][j - k] * (p[pre][sz][k][suf]);
      }
    }
  }
  //cout << p[0][1][0][0] << endl;
  //cout << q[2][0] << endl;
  //cout << q[2][1] << endl;
  mint res = 0;
  fac[0] = 1;
  rep(i, 1, maxn) fac[i] = fac[i - 1] * i;
  rep(i, n + 1) {
    if (i & 1) {
      res -= q[v.size()][i] * fac[n - i];
    } else {
      res += q[v.size()][i] * fac[n - i];
    }
  } 
  cout << res << endl;
  return 0;
}


Measured memory_bytes: 63872