import java.util.Scanner;
// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
static int[][] memo = new int[11][11]; // m,n <= 10
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int m = in.nextInt();
int n = in.nextInt();
System.out.println(solve(m, n));
}
public static int solve(int m, int n) {
if(m == 0) return 1;
if(n == 1) return 1;
if(m < 0) return 0;
if(memo[m][n] != 0) return memo[m][n];
// 至少一个盘子为空 -> 使用 n - 1 个盘子
int result = solve(m, n - 1);
// 每个盘子至少一个苹果(都不为空盘子)-> 先放 n 个,剩下 m - n 分配
result += solve(m - n, n);
memo[m][n] = result;
return result;
}
}