#include <bits/stdc++.h>
using namespace std;
template <class x>
vector<typename x::value_type> tovec(const x& a) {
  return vector<typename x::value_type>(a.begin(), a.end());
}
template <class u>
vector<typename iterator_traits<u>::value_type> tovec(u a, u b) {
  return vector<typename iterator_traits<u>::value_type>(a, b);
}
template <typename x>
ostream& operator<<(ostream& cout, const vector<x>& a) {
  cout << "[";
  if (((int)a.size())) cout << a[0];
  for (int i = 0; i++ < ((int)a.size()) - 1;) cout << ", " << a[i];
  return cout << "]";
}
template <typename u, typename v>
ostream& operator<<(ostream& cout, const pair<u, v>& a) {
  return cout << "(" << a.first << ", " << a.second << ")";
}
int n, k;
bool endOfChain[2020 * 2] = {0};
long long dp[2020 * 2][2020] = {0};
vector<long long> dfac(1, 1);
long long fac(int i) {
  while (((int)dfac.size()) <= i)
    dfac.push_back((dfac.back() * ((int)dfac.size())) % 924844033);
  return dfac[i];
}
int main(void) {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k;
  int l = k * 2;
  int pos = 0;
  endOfChain[pos] = 1;
  for (int i = 0; i++ < min(l, n);) {
    if (i - k < 1 and i + k > n) continue;
    int chainLength = (n - i) / l + 1;
    int last = (chainLength - 1) * l + i;
    int nEdge = chainLength * 2;
    if (i - k < 1) --nEdge;
    if (last + k > n) --nEdge;
    pos += nEdge;
    endOfChain[pos] = 1;
  }
  dp[0][0] = 1;
  for (int i = 0; i++ < pos;) {
    int back = i - 1 - !endOfChain[i - 1];
    for (int f = -1; ++f < n + 1;) {
      dp[i][f] = dp[i - 1][f];
      if (f == 0) continue;
      if (back < 0) continue;
      (dp[i][f] += dp[back][f - 1]) %= 924844033;
    }
  }
  long long* m = dp[pos];
  long long ans = 0;
  int sign = 1;
  fac(10);
  for (int i = -1; ++i < n + 1;) {
    (ans += sign * m[i] * fac(n - i)) %= 924844033;
    if (ans < 0) ans += 924844033;
    sign = -sign;
  }
  cout << ans;
  return 0;
}
