#include <iostream>
using namespace std;
//又是赚积分
#define maxn 433
int pri[85];
int num[maxn];
int vis[maxn]={0};
int top=0;
void produce()
{
for(int i=3;i<maxn;i+=2)
if(!vis[i])
{
for(int j=i*i;j<maxn;j+=i)
if(!vis[j])vis[j]=1;
}
pri[top++]=2;
for(int i=3;i<maxn;i+=2)if(!vis[i])pri[top++]=i;
}
void work(int n,int h)
{
for(int i=0;i<top;i++)
{
int j=pri[i];
while(n>=j)
{
int a=n/j;
num[pri[i]]+=h*a;
j*=pri[i];
}
}
}
int main()
{
produce();
int n,k;
for(;cin>>n>>k;)
{
memset(num,0,sizeof(num));
work(n,1);
work(k,-1);
work(n-k,-1);
long long int ans=1;
for(int j=0;j<top;j++)
if(num[pri[j]])ans*=(long long int)(num[pri[j]]+1);
printf("%lld\n",ans);
}
return 0;
}