Permutation p is an ordered set of integers p1, p2, ..., pn, consisting of n distinct positive integers, each of them doesn't exceed n. We'll denote the i-th element of permutation p as pi. We'll call number n the size or the length of permutation p1, p2, ..., pn.

We'll call position i (1 ≤ i ≤ n) in permutation p1, p2, ..., pn good, if |p[i] - i| = 1. Count the number of permutations of size n with exactly k good positions. Print the answer modulo 1000000007 (109 + 7).

Input

The single line contains two space-separated integers n and k (1 ≤ n ≤ 1000, 0 ≤ k ≤ n).

Output

Print the number of permutations of length n with exactly k good positions modulo 1000000007 (109 + 7).

Examples

Input

1 0


Output

1


Input

2 1


Output

0


Input

3 2


Output

4


Input

4 1


Output

6


Input

7 4


Output

328

Note

The only permutation of size 1 has 0 good positions.

Permutation (1, 2) has 0 good positions, and permutation (2, 1) has 2 positions.

Permutations of size 3:

  1. (1, 2, 3) — 0 positions
  2. <image> — 2 positions
  3. <image> — 2 positions
  4. <image> — 2 positions
  5. <image> — 2 positions
  6. (3, 2, 1) — 0 positions
#include <bits/stdc++.h>
const long long mod = 1000000007L;
const unsigned int N = 1024;
long long f[N][N][4];
int main() {
  unsigned int n, k;
  std::cin >> n >> k;
  if (n == k) {
    if ((n % 2) == 0) {
      std::cout << 1 << std::endl;
    } else {
      std::cout << 0 << std::endl;
    }
    return 0;
  }
  for (unsigned int i = 0; i < N; ++i) {
    for (unsigned int j = 0; j < N; ++j) {
      for (unsigned int b = 0; b < 4; ++b) {
        f[i][j][b] = 0;
      }
    }
  }
  f[0][2][0] = 1;
  f[0][2][3] = 1;
  f[1][2][0] = 1;
  f[1][2][2] = 2;
  f[1][2][3] = 1;
  f[2][2][0] = 1;
  f[2][2][2] = 3;
  f[2][4][1] = 1;
  f[2][4][2] = 3;
  for (unsigned int i = 2; i < n; ++i) {
    for (unsigned int j = 2, m = (i / 2) * 2 + 2; j <= m; ++j) {
      f[i][j][0] %= mod;
      f[i][j][1] %= mod;
      f[i][j][3] = (f[i][j][0] + f[i][j][1]) % mod;
      f[i][j][2] = (f[i][j][3] * (1 + i)) % mod;
    }
    for (unsigned int j = 2, m = (i / 2) * 2 + 2; j <= m; ++j) {
      long long t1, t2, t3, t4, t5, t6;
      long long M = (i + 2 - j);
      long long g3 =
          ((f[i - 1][j][1] + f[i - 1][j - 1][0] + mod) - f[i - 2][j - 1][3]) %
          mod;
      long long g4 = f[i - 2][j - 2][3];
      long long g1 =
          (((f[i][j][0] + mod) - ((g3 + f[i - 1][j][3]) % mod))) % mod;
      long long g2 = (f[i][j][1] + mod - g4) % mod;
      long long g5 = f[i - 1][j][3];
      long long g6 = f[i][j][1];
      long long g7 = f[i][j][3];
      t1 = (((((g1 * (M - 2)) + (g2 * (M - 1)) % mod + (g3 * (M - 1))) % mod +
              (g4 * M)) %
                 mod +
             (g5 * (M - 1))) %
                mod +
            (g6 + g7) % mod) %
           mod;
      t2 = (g3 + g4) % mod;
      t3 = (f[i][j][0] + mod - f[i - 1][j][3]) % mod;
      t4 = ((f[i][j][3] + mod) - (f[i - 1][j][3] + ((g3 + g4) % mod)) % mod) %
           mod;
      t5 = f[i - 1][j][3];
      long long z = (t1 + t2 + t3 + t4 + t5) % mod;
      if (f[i][j][2] < z) {
        f[i][j][2] += mod;
      }
      t6 = f[i][j][2] - z;
      f[i + 1][j][0] = (f[i + 1][j][0] + t1) % mod;
      f[i + 1][j][1] = (f[i + 1][j][1] + t2) % mod;
      f[i + 1][j + 1][0] = (f[i + 1][j + 1][0] + t3) % mod;
      f[i + 1][j + 1][1] = (f[i + 1][j + 1][1] + t4) % mod;
      f[i + 1][j + 2][1] = (f[i + 1][j + 2][1] + t5) % mod;
      f[i + 1][j - 1][0] = (f[i + 1][j - 1][0] + t6) % mod;
    }
  }
  std::cout << (f[n][k + 2][0] + f[n][k + 2][1]) % mod << std::endl;
  return 0;
}
