/*
Name:nyoj-158-省赛来了
Copyright:
Author:
Date: 2018/4/25 17:07:22
Description:
暴力,秒天秒地
*/
#include <iostream>
#include <cstdio>
using namespace std;
long long c[][];
int main()
{
for (int i=; i<; i++) {
c[i][] = c[i][i] = ;
for (int j=; j<i; j++) {
c[i][j] = c[i-][j] + c[i-][j-];
}
}
int m, n;
while (cin>>m>>n) {
long long ans = ;
while (m > ) {
ans *= c[m][n];
m -= n;
}
cout <<ans %<<endl;
}
return ;
}