1.

import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Scanner;

/**
* FWP, Ausgewählte Probleme aus dem ACM Programming Contest, WS09
Problem: 530 - Binomial Showdown
* http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=7&page=show_problem&problem=471
*
* @author Kratzer Kevin
* @version 1.0, 12/16/2009
*
* Method : Ad-Hoc Status : Accepted Runtime: 0.112
*/
public class Main530 {

public static void main(String... args) {
Scanner s = new Scanner(System.in);
while (true) {
long n = s.nextLong();
long k = s.nextLong();
if (k == 0 && n == 0) {
return;
}
if (k > (n - k)) {
k = n - k;
}

long result = 1;
for(int i = 1; i <=k; i++) {
result *= n;
result /= i;
n--;
}
System.out.println(result);
}
}

public static long fak(long start, long end) {
long fak = 1;
for (long i = start; i <= end; i++) {
fak *= i;
}
return fak;
}

}