#include <stdio.h>
int f(int n,int r)
{
if(n == r) return 1;
if(n <= 1) return 1;
return n * f(n - 1,r);
}
int main(void) {
int n,r;
scanf("%d %d",&n,&r);
if(n > r * 2) printf("%d", f(n,n-r) / f(r,0));
else printf("%d", f(n,r) / f(n - r,0));
return 0;
}