import java.util.Scanner;
public class student {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
while (scanner.hasNext()){
double n = scanner.nextInt();
double m = scanner.nextInt();
if (n==0 && m==0) {
System.exit(0);
}
else {
double m1=1 , o=1;
for (double a = n ; a > n-m; a--) {
o = o*a;
}
for (double b = 1 ; b <= m ; b++ ) {
m1 = m1*b;
}
double n1 = o/m1;
int change = (int)n1;
System.out.println(change);
}
}
}
}
小弟不才... 救救我~