Problem:
Score : 900 points

Problem Statement

Snuke loves permutations. He is making a permutation of length N.

Since he hates the integer K, his permutation will satisfy the following:

Let the permutation be a_1, a_2, ..., a_N. For each i = 1,2,...,N, |a_i - i| \neq K.

Among the N! permutations of length N, how many satisfies this condition?

Since the answer may be extremely large, find the answer modulo 924844033(prime).

Constraints

2 ≦ N ≦ 2000

1 ≦ K ≦ N-1

Input

The input is given from Standard Input in the following format:

N K

Output

Print the answer modulo 924844033.

Sample Input 1

3 1

Sample Output 1

2

2 permutations (1, 2, 3), (3, 2, 1) satisfy the condition.

Sample Input 2

4 1

Sample Output 2

5

5 permutations (1, 2, 3, 4), (1, 4, 3, 2), (3, 2, 1, 4), (3, 4, 1, 2), (4, 2, 3, 1) satisfy the condition.

Sample Input 3

4 2

Sample Output 3

9

Sample Input 4

4 3

Sample Output 4

14

Sample Input 5

425 48

Sample Output 5

756765083

Solution in Fortran (gfortran v4.8.4) (judge verdict: Accepted)

program not_k_perm_counting
  implicit none
  integer(8), parameter :: md = 924844033_8
  integer :: n, k, i, j, l, m, p
  integer(8) :: ans = 0_8, t = 1_8, g(0:4000,0:1) = 0_8
  integer(8), dimension(0:4000) :: f = 0_8, a = 0_8
  f(0) = 1_8
  g(0,0) = 1_8
  read(*,*) n, k
  do i = 1, n
    f(i) = mod(f(i-1)*int(i,8),md)
  end do
  do i = 1, k
    m = (n-i)/k
    do p = 1, 2
      do j = 1, m
        do l = n, 1, -1
          g(l,0) = mod(g(l,0)+g(l,1),md)
          g(l,1) = g(l-1,0)
        end do
        g(0,0) = mod(g(0,0)+g(0,1),md)
      end do
      do j = 0, n
        g(j,0) = mod(g(j,0)+g(j,1),md)
        g(j,1) = 0_8
      end do
    end do
  end do
  do i = 0, n
    ans = modulo(ans+t*mod(g(i,0)*f(n-i),md),md)
    t = -t
  end do
  write(*,'(i0)') ans
end program not_k_perm_counting