#include<stdio.h>
int size;
void dfs(int max, int m, int n) {
if (m==0||n==0){
size+=m==0;
return;
}
for (int i = m>max?m-max:0;i< m; i++)
dfs(m-i, i, n - 1);
}
int main() {
int m, n;
while (~scanf("%d%d", &m, &n)) {
size = 0;
dfs(m, m, n);
printf("%d\n", size);
}
}