#include <stdio.h>
int f(int a,int b)
{
if(a<b) return 0;
else if(b==0) return 1;
else if(b<=a) return f(a-1,b)+f(a,b-1) ;
}
int main()
{
int n ;
while(scanf("%d",&n),n)
printf("%d",f(n,n));
return 0;
}
#include <stdio.h>
int f(int a,int b)
{
if(b==0) return 1 ;
if(a<b) return 0 ;
else
return f(a-1,b)+f(a,b-1) ;
}
int main()
{
int n ;
while(scanf("%d",&n),n)
printf("%d\n",f(n,n));
return 0;
}
**************************************************************************
//动态规划法
#include <stdio.h>
#define MAX 200
void main( )
{
int n,i,j,a[MAX][MAX]={0};
scanf("%d",&n);
for ( i=0; i<=n; i++)
a[i][0]=1;
for (i=1; i<=n; i++)
for (j=1;j<=i; j++)
a[i][j]=a[i-1][j]+a[i][j-1];
printf("%d\n",a[n][n]);
}