import java.util.Arrays; import java.util.HashSet; import java.util.LinkedList; import java.util.Scanner; import java.util.Set; public class Main { public static long dfs(long[] memo, final int N, final int bit, final int K){ if(memo[bit] >= 0){ return memo[bit]; } //System.out.println(Integer.toBinaryString(bit)); final int all_bit_up = (1 << (K + 1)) - 1; if(all_bit_up == bit){ return memo[bit] = 0; } memo[bit] = 1; for(int k = K + 1; k < N; k++){ if((bit & (1 << k)) != 0){ continue; } memo[bit] += dfs(memo, N, bit | (1 << k), k); } return memo[bit]; } public static void main(String[] args) { Scanner sc = new Scanner(System.in); final int N = sc.nextInt(); final int K = sc.nextInt() - 1; long[] memo = new long[1 << N]; Arrays.fill(memo, -1); System.out.println(dfs(memo, N, 1 << K, K)); } }