1.

package acm_10219_find_the_ways;

import java.util.Scanner;

/**
 * FWP, AusgewŠhlte Probleme aus dem ACM Programming Contest, SS10
 * Problem: acm_10219_find_the_ways
 * Link: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=14&page=show_problem&problem=1160
 *
 * @author Martin Lambeck
 * @version 1.0, 14.08.2010
 *
 * Method : ad hoc
 * Status : Accepted
 * Runtime: 0.184
 */


public class Main
{
    static Scanner sc = new Scanner(System.in);

    public static void main(String... args)
    {
        while (testcase())
            ;
    }

    public static boolean testcase()
    {
        if (!sc.hasNextInt())
            return false;

        double num = 0;
        double denom = 0;
       
        int a = sc.nextInt();
        int b = sc.nextInt();
       
        b = Math.min(b, a-b);

        for (int i = 0; i < b; i++)
        {
            num += Math.log10(a-i);
            denom += Math.log10(i+1);
        }

        int d = ((int) (num-denom)) + 1;
       
        System.out.println(d);

        return true;
    }

    static void work()
    {

    }
}