#include <cstdio> using namespace std; int countNum(int m, int n) { if (m < 0 || n < 1) { return 0; } else if (m == 0 || n == 1) { return 1; } else { return countNum(m - n, n) + countNum(m, n - 1); } } int main() { int m, n; while (EOF != scanf("%d%d", &m, &n)) { printf("%d\n", countNum(m, n)); } return 0; }