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][K] >= 0){ return memo[bit][K]; } boolean has_lower = false; for(int k = 1; k < K; k++){ if((bit & (1 << k)) == 0){ has_lower = true; break; } } if(!has_lower){ return memo[bit][K] = 0; } memo[bit][K] = 1; for(int k = K + 1; k <= N; k++){ if((bit & (1 << k)) != 0){ continue; } memo[bit][K] += dfs(memo, N, bit | (1 << k), k); } return memo[bit][K]; } public static void main(String[] args) { Scanner sc = new Scanner(System.in); final int N = sc.nextInt(); final int K = sc.nextInt(); long[][] memo = new long[1 << (N + 1)][N + 1]; for(int i = 0; i < 1 << (N + 1); i++){ Arrays.fill(memo[i], -1); } System.out.println(dfs(memo, N, 1 << K, K)); } }