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
import java.util.*;
import java.io.*;
public class posperm{
public static int op[] = {0,1,2,4,6,8,9,16,17,18};
public static int dp[][][];
//public static long bf[][];
public static long mod =0;
/*public static void bf(int pos,int vec,int llevo,int tot,int prop){
if(pos==0){
bf[vec][prop]=(bf[vec][prop]+1)%mod;
return;
}
for(int n = 1;n<=tot;n++){
int prop2 = prop;
if(((1<<n)&llevo)!=0)continue;
if(pos==1){
if(n==tot)prop2|=1;
if(n==tot-1)prop2|=2;
}
if(pos==2){
if(n==tot)prop2|=(1<<2);
if(n==tot-1)prop2|=(1<<3);
if(n==tot-2)prop2|=(1<<4);
}
bf(pos-1,vec+((Math.abs((tot-pos+1)-n)==1)?1:0),llevo|(1<<n),tot,prop2);
}
}*/
public static long sum(int a,int b,int c[],long voy){
long tal =0;
if(a<0 || a>=dp.length || b<0 || b>=dp.length) return 0;
for(int n= 0;n<c.length;n++)
tal = (tal+dp[a][b][c[n]])%mod;
return tal%mod;
}
/*
public static long sum2(int a,int b,String c,long voy){
long tal =0;
if(a<0 || a>=dp.length || b<0 || b>=dp.length) return 0;
int y = 0;
for(int n =0;n<c.length();n++){
if(y>1)return 0;
if(n==3)y =0;
if(c.charAt(n)=='1')y++;
}

int d = c.indexOf("*");
if(d==-1)return dp[a][b][Integer.parseInt(c,2)];
for(int n = 0;n<2;n++)
tal=(tal+sum2(a,b,c.substring(0,d)+n+c.substring(d+1),0))%mod;
return tal%mod;
}*/
public static void main(String args[]) throws IOException{
BufferedReader lector = new BufferedReader(new InputStreamReader(System.in));
String tmp = lector.readLine();
int esp = 0;
int a = Integer.parseInt(tmp.substring(0,(esp=tmp.indexOf(" "))));
int b = Integer.parseInt(tmp.substring(esp+1));
mod = 1000000007;
long res = 0;
//bf = new long[Math.max(a+2,4)][33];
dp= new int[Math.max(a+2,4)][Math.max(a+2,4)][19];
dp[1][0][1]=1;
dp[2][0][9]=1;
dp[2][2][6]=1;
dp[3][0][9]=1;
dp[3][0][8]=1;
dp[3][2][6]=1;
dp[3][2][17]=1;
dp[3][2][4]=1;
dp[3][2][18]=1;
//String rejoder[] = {"00010","10010","01010","00110"};
int rejoder[] ={2,18,10,6};
//String joder[] ={"00000","10000","01000","00100"};
int joder[] ={0,16,8,4};
//String joder1[] = {"00001","01001","10001"};
int joder1[] ={1,9,17};
//String joder2[] = {"00010","10010","00110"};
int joder2[] ={2,18,6};
//String joder3[] = {"00000","01000","10000"};
int joder3[] ={0,8,16};
//String joder4[] = {"00010","10010"};
int joder4[] ={2,18};
int nn = 4,mm=0;
for(long n = 4;nn<a+1;n++,nn++){
mm=0;
for(long m = 0;mm<=n;m++,mm++){
//dp[n][m][0]=(((m+1)*sum(n-1,m+1,joder,0))%mod+((n-1-m-1)*sum(n-1,m,joder,0))%mod)%mod;
dp[nn][mm][0]=(int)((((m*dp[nn-1][mm+1][4])%mod+((n-m-2<0?0:n-m-2)*dp[nn-1][mm][4])%mod)%mod+((((m+1)*dp[nn-1][mm+1][8])%mod+
((n-m-3<0?0:n-m-3)*dp[nn-1][mm][8])%mod)%mod +(((m+1)*dp[nn-1][mm+1][16])%mod+((n-m-3<0?0:n-m-3)*dp[nn-1][mm][16])%mod)%mod+
(((m+1)*dp[nn-1][mm+1][0])%mod+((n-m-3<0?0:n-m-3)*dp[nn-1][mm][0])%mod)%mod)%mod)%mod);//ta loco
dp[nn][mm][1]=(int)(sum(nn-1,mm,joder,0)%mod);
dp[nn][mm][9]=(int)(sum(nn-1,mm,joder1,0)%mod);
dp[nn][mm][17]=(int)(sum(nn-1,mm,joder2,0)%mod);
dp[nn][mm][2]=(int)((dp[nn-1][mm][4]+sum(nn-1,mm-1,joder3,0))%mod);
//dp[n][m][16]=((m+1)*sum(n-1,m+1,joder2,0)%mod+((n-1-m-1)*sum(n-1,m,joder2,0))%mod)%mod;
dp[nn][mm][16]=(int)(((((m-1<0?0:m-1)*dp[nn-1][mm+1][6])%mod+((n-m-1<0?0:n-m-1)*dp[nn-1][mm][6])%mod)%mod+(((m*dp[nn-1][mm+1][18])%mod+
((n-m-2<0?0:n-m-2)*dp[nn-1][mm][18])%mod)%mod+((m*dp[nn-1][mm+1][2])%mod+((n-m-2<0?0:n-m-2)*dp[nn-1][mm][2])%mod)%mod)%mod)%mod);//ta loco
dp[nn][mm][18]=(int)((dp[nn-1][mm][6]+sum(nn-1,mm-1,joder4,0))%mod);
dp[nn][mm][6] = (int)(sum(nn-1,mm-2,joder1,0)%mod);
dp[nn][mm][4] = (int)((sum(nn-1,mm-1,joder,0)+sum(nn-1,mm,rejoder,0))%mod);//ta loco
dp[nn][mm][8] = (int)(((m+1)*sum(nn-1,mm+1,joder1,0)%mod+((n-1-m-1)*sum(nn-1,mm,joder1,0))%mod)%mod);
}

}
//bf(a,0,0,a,0);
//long res2 = 0;
for(int k = 0;k<op.length;k++){
//System.out.println(a+" "+b+" "+op[k]+" "+dp[a][b][op[k]]+" "+bf[b][op[k]]);
res=(res+dp[a][b][op[k]])%mod;
//res2 = (res2+bf[b][op[k]])%mod;
}
System.out.println(res%mod);//+" "+res2%mod);
}
}
