import java.util.*; public class Main { static int count=0; public static void main(String[] args) { Scanner sc=new Scanner(System.in); while(sc.hasNext()) { int n=sc.nextInt(); int k=sc.nextInt(); int d=sc.nextInt(); gg(n,d,0,k,0); System.out.println(count); } } public static void gg(int n,int d,int sum,int index,int max) { if(n==sum) { if(max>=d){ count++; } return; } int t=max; for(int i=index;i>=1;i--) { if(sum+i>n) { continue; } if(i>max) { max=i; } gg(n,d,sum+i,index,max); max=t; } } }