#include<stdio.h>
int fen(int m, int n)
{
    if(m == 0 || n == 1)
        return 1;
    else if(n > m)
        return fen(m, m);
    else
        return fen(m, n-1)+fen(m-n, n);
}
int main()
{
    int m, n;
    while(scanf("%d %d", &m, &n) != EOF)
    {
        int ret = fen(m, n);
        printf("%d", ret);
    }
    return 0;
}