semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
	int f(int x);
	int num,i,a[10000]={0},b;
	scanf("%d", &num);
    for(i=1;i<=num;i++)
	{
		scanf("%d", &b);
		a[i]=f(b);
	}
	for(i=1;i<=num;i++)
	{
		printf("%d\n", a[i]);
	}
	return 0;
}
int f(int x)
{
	if(x==1 || x==2) return 1;
	else
	{
		int c;
		c=f(x-1)+f(x-2);
		return c;
	}
}
int n;
int f[20];

void fb(int i)
{
	if(i == 0 ||i ==1)
		f[i] = 1;
	else
		f[i] = f[i - 1] + f[i - 2];
}

int main()
{
	cin >> n;
	for(int i = 0;i < 20;i++)
		fb(i);
	while(n > 0)
	{
		int m = 0;
		cin >> m;
		cout << f[m - 1] << endl;

		n--;
	}
}
int f(int n)
{  if(n==1||n==2)return 1;
   else return f(n-2)+f(n-1);
}
main()
{int n,i,a[100],m;
scanf("%d",&n); 
for(i=0;i<n;i++)
{scanf("%d",&a[i]);
 printf("%d\n",f(a[i]));
}
getchar();getchar();getchar();
}
void main()
{
	int fb(int a);
    int n,a,m,i;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{scanf("%d",&a);
	m=fb(a);
	printf("%d\n",m);}
}

int fb(int a)
{
	int k,sl[20],x;
	sl[1]=1;
	sl[2]=1;
	for(k=3;k<=a;k++)
	{sl[k]=sl[k-2]+sl[k-1];}
	x=sl[a];
	return(x);
}
int main(){
	int n,m,i,j,a[20],c[100];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		a[0]=1;
		a[1]=1;
		c[i]=0;
		scanf("%d",&m);
		if(m==1||m==2){
			c[i]=1;
		}
		else{
			c[i]=2;
			for(j=2;j<m;j++){
				a[j]=a[j-2]+a[j-1];
				c[i]=a[j];
			}
		}
	}
	for(i=0;i<n;i++){
		printf("%d\n",c[i]);
	}
	return 0;
}
int main()
{
	int n, m, i, x, y, temp;
	cin>>n;
	while(cin>>m)
	{
		x=1;
		y=1;
		for (i=0;i<m-2;i++)
		{
			x=y+x;
			temp=y;
			y=x;
			x=temp;
		}
	cout<<y<<endl;
	}
	return 0;
}
int F(int n);
int main(){
	int n;
	int bb[20],sl[20];
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		scanf("%d",&bb[i]);
		sl[i]=F(bb[i]);
		printf("%d\n",sl[i]);
	}
	return 0;
}


int F(int n){
	int result;
	int sz[10000];
	    sz[0]=1,sz[1]=1;
	for(int r=2;r<10000;r++){
		sz[r]=sz[r-1]+sz[r-2];
	}
	for(int y=0;y<10000;y++){
		if(n==y+1){
			result=sz[y];
			break;
		}

	}
	return result;
}
int main()
{
	int n=0,a=0,x=1,y=1,m=0,i=0;
	cin>>n;
	for(int j=0;j<n;j++){
		cin>>a;
		x=1;y=1;
		if((a==1)||(a==2))cout<<1<<endl;
		if(a>2){
			for(i=1;i<=(a-2);i++){
				m=x+y;
				x=y;
				y=m;
			}
			cout<<m<<endl;
		}
	}
	return 0;
}
int main(){
int n,a,b=1,c=1,y;
scanf("%d",&n);
for(int j=0;j<n;j++){
   scanf("%d",&a);
   for(int i=0;i<a;i++){
	   if(i==0||i==1){
	     y=1;
	   }
	   else{
	     y=b+c;
		 c=b;
		 b=y;

	   }
   }
   printf("%d\n",y);
   c=1;
   b=1;
}



return 0;
}
int a[201];
void ni(int m)
{
	if(m==202)
		return;
	a[m]=a[m-1]+a[m-2];
	ni(m+1);
}
int main()
{
	a[0]=1;
	a[1]=1;
	ni(2);
	int n,i,k;
	cin>>n;
	for(i=1;i<=n;i++)
	{
		cin>>k;
		cout<<a[k-1]<<endl;
	}
	return 0;
}
void main()
{
	int n,i,d,k,a,b[21],c[21];
	b[1]=1; b[2]=1;
	scanf("%d\n",&n);
	for (i=1;i<=n;i++)
		scanf("%d\n",&c[i]);
        for (i=1;i<=n;i++)
          {
             d=c[i];
                for (k=3;k<=d;k++)
			b[k]=b[k-2]+b[k-1];
               printf("%d\n",b[d]);
	}
}
int main(){
	int a=1,b=1,n,k,m,i;
	cin>>n;
	for(k=1;k<=n;k=k+1)
	{
		cin>>m;
		a=1,b=1;//?????????????a ?b??
		for(i=1;i<=(m-1)/2;i=i+1)
		{
		   a=a+b;
		   b=a+b;
		}
		if(m%2==1)
		{
			cout<<a<<endl;
		}
		else
		{
			cout<<b<<endl;
		}
           }
return 0;
}
int ferbo(int r)
{
    if(r==1||r==2)
    return 1;
    else
    return ferbo(r-1)+ferbo(r-2);
}
int main()
{
    int b[20],i,n;
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
        scanf("%d",&b[i]);
    }
    for(i=0;i<n;i++)
    {
        printf("%d\n",ferbo(b[i]));
    }
}
int main() {
	int n=0;
	int a[21];
	cin>>n;
	for (int i=0;i<n;i++){
		cin>>a[i];
		if (a[i]==1)                  //?????1
			cout<<1<<endl;
		if (a[i]==2)	              //?????1
			cout<<1<<endl;
		if (a[i]>=3){		      //??????????
			int a1=1,a2=1,a3=0;
		  for (int j=3;j<=a[i];j++){
			a3=a1+a2;
			 a1=a2;
			 a2=a3;}	      //????????2????? 

		cout<<a3<<endl;} 
	}

	return 0;
}
int main()
{
	int n=0;
	cin >> n;
	int a[n];
	int i,j=0;
	int f1,f2,p=0;
	for(i=1;i<=n;i++)
	{
		cin >> a[i];
	    f1=1;
	    f2=1;
	    p=1;
		if(a[i]==1||a[i]==2) cout <<"1" <<endl;
		else
		{
			for(j=1;j<=a[i]-1;j++)
			{
				p=f1;
				f1=f2;
				f2=f2+p;
			}
			cout << f1 <<endl;
		}
	}
return 0;
}
int sum(int m);
int main()
{
int m,n,i,a[100];
scanf("%d",&n);
a[1]=1;a[2]=1;
for(i=1;i<=n;i++)
{
scanf("%d",&m);
printf("%d\n",sum(m));
}
}
int sum(int m)
{
int i,a[100];
for(i=3;i<=21;i++)
{
a[1]=1;a[2]=1;
a[i]=a[i-1]+a[i-2];
}
return a[m];
}
int fibo(int, int, int);

int main()
{
	int n, a;
	cin >> n;
	for (int i = 1; i <= n; i++)
	{	
		cin >> a;
		cout << fibo(a, 1, 1) << endl;
	}
	return 0;
}

int fibo(int a, int b, int e)
{
	if (a <= 2)
		return e;
	else
		fibo(a - 1, e, b + e);
}
int main () {
	int n,i,j,a,b,t;
	int p[1000];
	int s;
	scanf ("%d",&n);
	for (i=0;i<n;i++){
		scanf ("%d",&p[i]);
	}
for (i=0;i<n;i++){
		if (p[i]==1||p[i]==2){
				printf ("1\n");
			}
			else {
				s=0;a=1;b=1;
				for (j=1;j<=p[i]-2;j++){
				s=a+b;
			t=b;
			b=s;
			a=t;

			
		}
		
		printf ("%d\n",s);
			}
		

}
return 0;
}
int main()
{
	int n,a,x,y,i,e,k;
	scanf("%d",&n);
	for(i=1;i<=n;i++){
		scanf("%d",&a);
		if(a==1){
			printf("1\n");
		}else if(a==2){
			printf("1\n");
		}else{
			x=1,y=1;
			for(k=3;k<=a;k++){
				e=y;
				y=x+y;
				x=e;
			}
			printf("%d\n",y);
		}
	}
	return 0;
}
int fun(int n);
main()
{
   int n;
   scanf("%d",&n);
   int num;
   for(int i=0;i<n;i++)
   {
      scanf("%d",&num);
      printf("%d\n",fun(num));
   }  
   getchar();
   getchar();
}
int fun(int n)
{
    if(n==1||n==2)  return 1;
    else 
    {
       int sum=0;
       sum=fun(n-1)+fun(n-2);
       return sum;  
    } 
}
int main()
{
    int s[50],n,i,j,p,q,a;
    cin>>n;
    for(i=1;i<=n;i++)
        cin>>s[i];
    for(i=1;i<=n;i++)  
    {
        p=0;
        q=1;
        if(s[i]==1)
        q=1;
        if(s[i]>1)
        {
            for(j=2;j<=s[i];j++)
            {   
                a=p;
                p=q; 
                q=q+a;
            }
        }
        cout<<q<<endl;
    }
   
        return 0;
 }
int F(int n){
int a,b,i,s;
if(n==1){s=1;}
else if(n==2){s=1;}
else {
      a=1;
      b=1;
	  for(i=3;i<=n;i++){
      s=a+b;
	  a=b;
	  b=s;}}
return s;
}
int main(){
int a[10000],i,n;
scanf("%d",&n);
for(i=1;i<=n;i++){
    scanf("%d",&a[i]);}
for(i=1;i<=n;i++){
    printf("%d\n",F(a[i])); }
return 0;
}
int main ()
{
	int n,m=25,i,j,a[30],b[30];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
	}
		
	b[0]=1;
	b[1]=1;
	b[2]=2;
	for(j=3;j<m;j++)
		{
		b[j]=b[j-1]+b[j-2];
	}
		 
       for(i=0;i<n;i++)
	   {
	   printf("%d\n",b[a[i]-1]);
	   }

	   return 0;
}
//??????
int fun(int n);
int main()
{
	int n = 0, i = 0, x = 0;
	cin >> n;
	for (i = 1; i <= n; i++)
	{
		cin >> x;
		cout << fun(x) << endl;
	}
	return 0;
}
int fun(int n)
{
	if (n == 1 || n == 2)
		return 1;
	else
		return fun(n - 1) + fun(n - 2);
}
int main(){
	int n,a,b,c,i,j,m,sz[100];
	scanf("%d",&m);
	for(j=0;j<m;j++){
	    scanf("%d",&n);
	    a=1;
	    b=1;
	    if(n==1||n==2){
		    c=1;
		}else if(n>=3){
	        for(i=3;i<=n;i++){
		        c=a+b;
		        a=b;
		        b=c;
			}
		}
	    sz[j]=c;
	}
	for(j=0;j<m;j++){
		printf("%d\n",sz[j]);
	}
	return 0;
}
int main(){
   int f1,f2,f3,n,a,i,b;
   cin>>n;
   for (i=1;i<=n;i=i+1)
       {
          cin>>a;
          f1=1;
          f2=1;
          for(b=1;b<=(a-1);b++)
          {
                               f3=f1+f2;
                               f1=f2;
                               f2=f3;
          }
cout<< f1  << endl;}
return 0;
}
int F(int n);

int main()
{
	int n[1000],a[1000],k,i;
	scanf("%d",&k);
	for(i=0;i<k;i++){
		scanf("%d",&n[i]);
		a[i]=F(n[i]);
	}
	for(i=0;i<k;i++){
		printf("%d\n",a[i]);}

	return 0;
}
int F(int n){
	int f1=1,f2=1,f3=f1+f2,i;
	if(n==1){return 1;}
	else if(n==2){return 1;}
	else{
		for(i=2;i<n;i++){
			f3=f1+f2;
			f1=f2;
			f2=f3;
		}
		return f3;
	}
}
int main()
{    
     int n,m;
     int i,j,k;
     int a[100];
     scanf("%d",&n);
    for(i=1;i<=n;i++)
    scanf("%d",&a[i-1]);
    int b[100];
    b[1]=1;
    b[0]=1;
    for(i=2;i<=22;i++)
      b[i]=b[i-1]+b[i-2];
      for(i=0;i<n;i++)
      {
         m=a[i];
         printf("%d\n",b[m-1]);
         }             
     getchar();
     getchar();
     getchar();
     getchar();
     getchar();
 
}
/*
 * feibonaqi.cpp
 *?? - 1063 ??????
 *?? ?????????????: ?????????????1????????????2?????
???????a???????????a??????
 *  Created on: 2013-11-18
 *      Author: ???
 */
int f[20] = { 1 , 1 }; // ??????
void cal(int x){ // ????????
	f[x] = f[ x - 1 ] + f[ x - 2 ];
}
int main(){
	int n , a , needle = 1; // ??????????? needle ??
	for(cin >> n; n --; ){
		cin >> a;
		for(int i = needle + 1; i < a; i ++) // ??????????? a ?
			cal(i);
		cout << f[ a - 1 ] << endl;
	}
	return 0;
}
main()
{
      int b[20]={1,1},m,n,i;
      
      for(i=2;i<20;i++)
      b[i]=b[i-1]+b[i-2];
      scanf("%d",&n);
      
      for(i=0;i<n;i++)
      {
          scanf("%d",&m);
          printf("%d\n",b[m-1]);
      }
      getchar();
      getchar();
}
int main()
{
int n,i=0,num;
int feibo[21]={1,1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765};
cin>>n;
while(i<n)
{
cin>>num;
cout<<feibo[num]<<endl;
i++;
}
return 0;
}
main()
{
      int a,i,j,n,f[30];
      f[0]=1;f[1]=1;
      scanf("%d",&n);
      for(i=0;i<n;i++)
      {
                      for(j=2;j<30;j++)f[j]=0;
                      scanf("%d",&a);
                      if(a<=2)printf("1\n");
                      else
                      {
                          for(j=2;j<a;j++)
                          {
                                          f[j]=f[j-1]+f[j-2];
                          }
                          printf("%d\n",f[a-1]);
                      }
      }
}
int main()
{  int n,x[100],a[100],z[100];
    scanf("%d",&n);
 x[0]=1;x[1]=1;
  for(int i=2;i<20;i++){x[i]=x[i-1]+x[i-2];}
  
  for(int j=0;j<n;j++){
  scanf("%d",&a[j]);
  z[j]=x[a[j]-1];
}
  for(int t=0;t<n;t++){
  printf("%d\n",z[t]); 
  }
return 0;
}
int main()
{
int n,a,r=1,b,c,d,z,temp;
cin>>n;
for(r=1;r<=n;r++)
{
	cin>>a;
	b=c=1;
	for(temp=1;temp<=a;temp++)
	{
	z=b;
	d=b+c;
	b=c;
	c=d;
	}
	cout<<z<<endl;
}

return 0;
}
int main(int argc, char* argv[])
{
	int a,b,c,n;
	int sz[20];
	int wt[20];
	sz[1]=1;
	sz[2]=1;
	scanf("%d",&n);
	for(a=0;a<n;a++)
	{
		scanf("%d",&wt[a]);
	}
	for(a=0;a<=n;a++)
	{
		b=wt[a];
		if(b==1)
		{
			printf("%d\n",sz[1]);
		}
		else if(b==2)
		{
			printf("%d\n",sz[2]);
		}
		else if(b>=3)
		{
			for(c=3;c<=b;c++)
			{
				sz[c]=sz[c-2]+sz[c-1];
			}
				printf("%d\n",sz[b]);
		}
	}
	return 0;
}
int f(int a)
{
	if(a==1)
		return 1;
	if(a==2)
		return 1;
	else
		return f(a-1)+f(a-2);
}
int main()
{
	int n=0,m=0;
	scanf("%d",&n);
	for(int i=0;i<n;i++)
	{
		cin>>m;
		printf("%d\n",f(m));
	}
	return 0;
}
int main(){
	int n;
	int a[22];
	int i;
	int g,j;
	
	scanf("%d",&g);
	for(j=0;j<g;j++){
		scanf("%d",&n);
		for (i=0;i<n;i++){
			if((i==0)||(i==1)){
				a[i]=1;
			}
			if(i>1){
				a[i]=a[i-1]+a[i-2];
			}
		}
		if(j==0){
			printf("%d",a[n-1]);
		}
		else if(j!=0){
			printf("\n%d",a[n-1]);
		}
	}
    return 0;
	}
int main()
{
int n;
cin>>n;
while(n--)
{
int a=0,b=1,c,num,re=0;
cin>>num;
num--;
while(num--)
{
c=b;
b=a+b;
a=c;
}
cout<<b<<endl;
}
return 0;
}
int main()
{
   int n,a,i,j;
   int c[10000],b[10000];
   c[0]=1;c[1]=1;
   scanf("%d",&n);
   for(i=1;i<=n;i++)
   {
      scanf("%d/n",&a);
      b[i-1]=a;
    }
    for(i=1;i<9999;i++)
    {
        c[i+1]=c[i]+c[i-1];
     }
    for(i=0;i<n;i++)
    {
       j=b[i];
       printf("%d\n",c[j-1]);
    }
    return 0;
}
int main()
{   int N;
	cin>>N;
	int i;
	int A[20];
	A[0]=1;
	A[1]=1;
	for(i=2;i<20;i++)
	{
		A[i]=A[i-1]+A[i-2];
	}

	int j;
	int a;
	for(j=0;j<N;j++)
	{
		cin>>a;
		if(a>=1&&a<=20)
		  cout<<A[a-1]<<endl;

	}

    return 0;
}
int f(int x){
	int i,sz[1000];
	for(i=0;i<x;i++){
		if(i==0){sz[i]=1;}
		if(i==1){sz[i]=1;}
		if(i>1){
			sz[i]=sz[i-1]+sz[i-2];
		}
	}
	return sz[x-1];
}
int main(){
	int n,y,m[1000],h[1000];
	scanf("%d",&n);
	for(y=0;y<n;y++){
		scanf("%d",&m[y]);
		h[y]=f(m[y]);
	}for(y=0;y<n;y++){
		printf("%d\n",h[y]);
	}
	return 0;
}
int main()
{
   int n,s[20],i,j,a,b,c;
   scanf("%d",&n);
   for(i=0;i<n;i++)
   {
	   scanf("%d",&(s[i]));
   }
   for(i=0;i<n;i++)
   {
	   if(s[i]<=2)
	       printf("1\n");
	   if(s[i]>2)
	   {
		       a=1;
			   b=1;
		       for(j=3;j<=s[i];j++)
			   {
		           c=a+b;
		           a=b;
		           b=c;
			   }
	          printf("%d\n",c);
	   }
   }
	return 0;

}
int main()
{
	int *a;
	int n,i;
	int x(int c);
	scanf("%d",&n);
	a=(int *)malloc(n*sizeof(int));
	for(i=0;i<n;i++)
	{
		scanf("%d",a+i);
	}
	for(i=0;i<n;i++)
	{
		printf("%d\n",x(*(a+i)));
	}
	return 0;

}
int x(int c)
{
	int r;
	if(c==1)
		return 1;
	else if(c==2)
		return 1;
	else
	{
		r=x(c-1)+x(c-2);
		return r;
	}
}
int main(){
	int n;
	scanf("%d",&n);
	int sz[1000];
	int a;
	for(int i=0;i<n;i++){
		scanf("%d",&a);
		for(int j=0;j<a;j++){
			if(j==0||j==1){
				sz[j]=1;
			}
			else{
		     	sz[j]=sz[j-1]+sz[j-2];
			}
		}
		printf("%d\n",sz[a-1]);
	}
	return 0;
}
//?? - ??????   
 

int main()
{
    int f(int);
    int n;
    int a;
    int i,j;
    scanf("%d",&n);
    printf("\n");
    for(i=0;i<n;i++)
    {
                    scanf("%d",&a);
                    printf("%d\n\n",f(a));
                    
    }
    return 0;
}
int f(int a)
{
    if(a==1)return 1;
    if(a==2)return 1;
    else return f(a-1)+f(a-2);
}
int main(){
int n,i,j,a,sz[20],r[100];
sz[0]=0;
sz[1]=1;
scanf("%d",&n);
for(j=0;j<n;j++)
{
  scanf("%d",&a);
    for(i=2;i<=a;i++)
	{sz[i]=sz[i-1]+sz[i-2];}
  r[j]=sz[a];
}
for(j=0;j<n;j++)
{if(j==0){printf("%d",r[j]);}
 else{printf("\n%d",r[j]);}
}
return 0;
}
int main()
{
	int a, n;
	cin >> n;
	while (n --)
	{
		cin >> a;
		if (a == 1)
			cout << 1 << endl;
		else if (a == 2)
			cout << 1 << endl;
		else
		{
			int a1, a2, a3;
			a1 = 1;
			a2 = 1;
			for (int i = 3; i <= a;	i ++)
			{
				a3 = a1 + a2;
				a1 = a2;
				a2 = a3;
			}
			cout << a3 << endl;
		}
	}
	return 0;
}
int value(int a){
	int p=1,q=1,i,result;
	if(a>=3){
		for(i=3;i<=a;i++){
			result=p+q;
			p=q;
			q=result;
		}
	}else{
		result=1;
	}
	return result;
}
int main(){
	int a,i,n,result;
	scanf("%d",&n);
	for(i=1;i<=n;i++){
		scanf("%d",&a);
		result=value(a);
		printf("%d\n",result);
	}
	return 0;
}
int fei(int m)
{
	if (m == 1)
		return 1;
	if (m == 2)
		return 1;
	return fei(m - 1) + fei(m - 2);
}
int main()
{
	int n, i, a[20], num;
	cin >> n;
	for (i = 0; i < n; i++)
	{
		cin >> a[i];
		num = fei(a[i]);
		cout << num << endl;
	}
	return 0;
}
//********************
//*??; ??????*
//*??:???       *
//*2012-12-19        *
//********************
int main()
{
	int n, a, i=1, j=1, m[30];      //?????????
	cin >> n; 
	for (i=1;i<=n;i++)
	{ 
		int m[30]={1,1};       //???????????2??1
		cin >> a;              //??????
		for (j=2;j<=a-1;j++)   //???????3????
		{
			m[j]=m[j-1]+m[j-2];
		}
		cout << m[a-1] << endl;//????
	}
	return 0;
}
//
//  main.cpp
//  10.15 homework
//  ??????

//  Created by airjcy on 10/8/12.
//  Copyright (c) 2012 airjcy. All rights reserved.
//






int main(int argc, const char * argv[])
{
    int n; //????
    cin >> n;
    int i;
    for (i = 0; i < n; i++) {
        int a = 1;
        int b = 1;
        int num; //??????
        cin >> num;
        int j;
        int t;
        for (j = 1; j < num; j ++) {
            t = b;
            b = a + b;
            a = t;
        }
        cout << a << endl;
    }

}
/*
 * phoenix3+1.cpp
 *Author: ???
 *  Created on: 2013-9-28
 *    ??????
 */
int main()
{
	int i,n,c,a[20],b[20];
	cin>>n;
	 for (i=0;i<n;i++)
	 {
		cin>>a[i];

	 }
	 for(i=0;i<20;i++)
	 {
		 if((i==0)||(i==1))
			 b[i]=1;
		 else b[i]=b[i-1]+b[i-2];
	 }
	 for(i=0;i<n;i++)
	 {
		 c=a[i];
		 cout<<b[c-1]<<endl;
	 }

	 return 0;
}
int compare(const void *a, const void *b)
{
	return *(int*)a - *(int *)b;
}

int main()
{
	int n, a[100], b;
	a[0] = 1, a[1] =1;
	cin >> n;
	for (int i = 2; i <= 30; i ++)
	{
		a[i] = a[i-1] + a[i-2];
	}
	for (int i = 0; i < n; i ++)
	{
		cin >> b;
		cout << a[b-1] << endl;
	}
	return 0;
}
int suan(int n,int *p)
{ 
    p=(int*)malloc(sizeof(int)*n);
    if(n==1||n==2)
    {
                  *(p+n-1)=1;
    }
    else
    {
        *(p+n-1)=suan(n-1,p)+suan(n-2,p);
    }
    return *(p+n-1);
} 
int main()
{
    int b,n,i;
    scanf("%d",&b);
    for(i=0;i<b;i++)
    {
    scanf("%d",&n);
    int a[n];
    int *p;
    p=a;
    printf("%d\n",suan(n,p));
    }
    getchar();
    getchar();
    getchar();
    }
int main()
{
	int casenum;
	cin >> casenum;
	int f[100];
	f[0] = 0;
	f[1] = 1;
	int i;
	for(i = 2;i <= 20; i ++)
	{
		f[i] = f[i-1] + f[i-2];
	}
	while(casenum--)
	{
		int a;
		cin >> a;
		int i,j;
		cout<<f[a]<<endl;
	}
	return 0;
}
int main(){
int n,sum=0,a=1,b=1,d[20],c[20];
scanf("%d",&n);
for(int i=0;i<n;i++){
    scanf("%d",&d[i]);
if(d[i]>2){
for(int j=1;j<d[i]-1;j++){
	sum=a+b;
	a=b;
	b=sum;
}
}else{
	b=1;
}
c[i]=b;
b=1;
a=1;
}
for(int k=0;k<n;k++){
	printf("%d\n",c[k]);
}
return 0;
}
int fib(int n)
{
	if (n == 1)
		return 1;
	if (n == 2)
		return 1;
	return fib(n - 1) + fib(n - 2);
}
int main()
{
	int n, k;
	cin >> n;
	while (n--)
	{
		cin >> k;
		cout << fib(k) << endl;
	}
	return 0;
}
int main()
{
    int i,n,j,t;
	int a[20]={1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765};
   	int b[20];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&j);
	    b[i]=j-1;
	}
	for(i=0;i<n;i++)
	{
	t=b[i];
	printf("%d\n",a[t]);
	}
	return 0;
}
int Fibonacci(int n);
int main(){
	int n,i,j,sz[20];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&j);
		sz[i]=Fibonacci(j);
		printf("%d\n",sz[i]);
	}
	return 0;
}
int Fibonacci(int n){
	int s1,s2,s3,i;
	if(n==1){
		return 1;
	}
	if(n==2){
		return 1;
	}
	s1=1;
	s2=1;
	for(i=0;i<n-2;i++){
		s3=s2+s1;
		s1=s2;
		s2=s3;
	}
	return s3;
}
int f(int n)
{
   if (n==1)
      return 1;
   else if (n==2)
      return 1;
   else if (n>2)
      return(f(n-1)+f(n-2));
}
int main()
{
   int m,a;
   scanf("%d",&m);
   while (m--)
   {
      scanf("%d",&a);
      printf("%d\n",f(a));
   }

}
int main(){
int n,a[20],b[20],c[20],i,t,k,w;
scanf("%d",&n);
for(k=0;k<n;k++){
scanf("%d",&a[k]);
}
for(i=0;i<n;i++){
b[i]=0;
c[i]=1;
	for(w=0;w<a[i]-1;w++){

t=b[i];
b[i]=c[i];
c[i]=b[i]+t;

	}
	printf("%d\n",c[i]);
}
return 0;



}
void main()
{
	int a,k,i,n;
	int zhaodao(int a);
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{

	scanf("%d",&a);
	k=zhaodao(a);
	printf("%d\n",k);
	}
}
int zhaodao(int a)
{
	if(a==1||a==2)
		return(1);
	else
		return(zhaodao(a-1)+zhaodao(a-2));
}
int main(){
   int n,i,k,a[100000],f[100000]={1,1};
   scanf("%d",&n);
   for(k=0;k<n;k++){
        scanf("%d",&a[k]);
        for(i=2;i<=a[k];i++){
           f[i]=f[i-2]+f[i-1];
           }
           printf("%d\n",f[a[k]-1]);
        }
    scanf("%d",&n);
    return 0;
    }
int a[100] = {0};
int f(int num)
{
	if (a[num] == 0)
		return (f(num - 1) + f (num - 2));
	else
		return a[num];
}
int main()
{
	a[1] = 1;
    a[2] = 1;
	int num, n;
	cin >> n;
	for (int i = 1; i <= n; i++)
	{
		cin >> num;
	    cout << f(num) << endl;
	}
	return 0;
}
int main()
{
    int data[20] = {1,1};
    int n;
    int a;
    int i, j;
    
    for(j = 2; j <= 19; j++)
                data[j] = data[j - 2] + data[j - 1];
    
    scanf("%d", &n);
    
    for(i = 0; i <= n - 1; i++)
    {
          scanf("%d", &a);
          printf("%d\n", data[a - 1]);
    }
    
    return 0;
}
int main ()
{
	int f[21];
	f[0] = 1;
	f[1] = 1;
	f[2] = 1;
	for (int i = 3; i <= 20; i ++)
	{
		f[i] = f[i-1] + f[i-2];
	}
	int n;
	cin >> n;
	for (int i = 0; i < n; i ++)
	{
		int a;
		cin >> a;
		cout << f[a] << endl;
	}
		
	return 0;
}
int main()
{
	int a[100];
	a[1]=1;
	a[2]=1;
	for(int i=3;i<=21;i++)
		a[i]=a[i-1]+a[i-2];
	int n;
	int m;
	cin>>n;
	while(n--)
	{
		cin>>m;
		cout<<a[m]<<endl;
	}

}
/*
 *???: fibonacci.cpp
 *??: ???
 *????: 2012-10-13
 *??: ?????????a??
 */



const int AMAX=20;

int main()
{
	int fib[AMAX+1]; //??????????20?
	fib[1]=fib[2]=1;
	for (int i=3;i<=AMAX;i++){
		fib[i]=fib[i-1]+fib[i-2]; //??fib[i],i=3,4,...,20
	}

	int n,a;
	cin >> n;
	while (n--){
		cin >> a;
		cout << fib[a] <<endl;
	}
	return 0;
}
int main()
{
	int n;
	scanf("%d",&n);
	int a[100];
	int i;
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
		int b[100];
		b[0]=1;
		b[1]=1;
		int j;
		for(j=2;j<100;j++)
		{
			b[j]=b[j-1]+b[j-2];
		}
		printf("%d\n",b[a[i]-1]);
	}
	return 0;
}
int main(int argc, char* argv[])
{   int a1=1,a2=1,i=0,a,n,e,y=0;
    scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&e);
		a1=1;
		a2=1;
		if(e<=2){a=1;}else{
		for(y=0;y<e-2;y++){
			a=a1+a2;
			a1=a2;
			a2=a;
		}}
		printf("%d\n",a);
		
	}
	return 0;
}
int main()
{
    int *p,i,n,j,k;
    p=(int*)malloc(10000*sizeof(int));
    *(p+1)=*p=1;
    scanf("%d",&n);
    for(j=0;j<n;j++)
    {
        scanf("%d",&k);
        if(k>2)
        {
            for(i=2;i<k;i++)
            *(p+i)=*(p+i-1)+*(p+i-2);
            printf("%d\n",*(p+k-1));
        }
        else printf("%d\n",*(p+k-1));
    }
}
int main()
{
	int shu[20],fei[20],chu[20];
	int n,i,j,b;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&shu[i]);
	}
	fei[0]=1;
	fei[1]=1;
	for(j=2;j<20;j++)
	{
		fei[j]=fei[j-1]+fei[j-2];
	}
	for(b=0;b<n;b++)
	{
		chu[b]=fei[shu[b]-1];
		printf("%d\n",chu[b]);
	}
	return 0;
}
main()
{
    int a[101],i,n,c=0;
    scanf("%d",&n);
    for(i=1;i<=n;i++)
    {
        scanf("%d",&a[i]);
        c++;
        }
    int b[101];
    b[1]=1;
    b[2]=1;
    for(i=3;i<=100;i++)
    {
        b[i]=b[i-1]+b[i-2];

        }
    for(i=1;i<=c;i++)
    {
        printf("%d\n",b[a[i]]);
        }
    }
/*
 * Fibonacci.cpp
 *
 *  Created on: 2012-10-22
 *  Author: ??
 *  ????????????????: ?????????????1????????????2?????
???????a???????????a??????
 */


int main()
{
	int n = 0 ,a = 0, b = 1 , x1 =1, x2 =1, x3 = 1  ; //???????????
	cin >> n ;                //????
	for ( int i = 0 ; i<n ; i++ )
	{
		cin >> a ;           //??a
		if ( a == 1 || a == 2 )
		cout << "1" << endl ;    //?????????????1
		else
		{
			for ( int k = 1 ; k <= a-2 ; k++ )
			{
				x3 = x1 + x2 ;
				x1 = x2 ;
				x2 = x3 ;      //??b??
			}
			b = x3 ;                //?b??
			cout << b << endl ;     //??b??
			x1 =1, x2 =1, x3 = 1  ;    //????
		}
	}
	return 0 ;                     //??

}
int main()
{
	int num=0, n=0, i=0, j=0, p=1, q=1, temp=0, a;
	scanf("%d", &n);
	for(i=0; i<n; i++)
	{
		scanf("%d", &num);
		if(num == 1 || num == 2)
			printf("1\n");
		else
		{
			for(j=3; j<=num; j++)
			{			
				a=p+q;		
				p=q;			
				q=a;		
			}		
			printf("%d\n", a);
			a=0;
			p=1;
			q=1;
		}
	}
	return 0;
}
int main()
{
int n,x[20],ai,i,j,b;
x[1]=1;
x[2]=1;
for(j=3;j<=20;j++)
	x[j]=x[j-1]+x[j-2];
cin>>n;
for(i=1;i<=n;i++){
	cin>>ai;
	b=x[ai];
	cout<<b<<endl;
}
return 0;
}
int f(int a);
int main()
{
   int n,a,i;
   scanf("%d",&n);
   for(i=1;i<=n;i++){
       scanf("%d",&a);
       printf("%d\n",f(a));
   }
   return 0;
}
int f(int a){
    if(a==1||a==2){
       return 1;
    }
    int b,c,d,k;
    c=1;
    d=1;
    for(k=3;k<=a;k++){
        b=c;
        c=d;
        d=b+c;
    }
    return d;
}
int f(int n)
{
	if(n==1)
	{
		return 1;
	}
	else if(n==2)
	{
		return 1;
	}
	else
	{
		return(f(n-1)+f(n-2));
	}
}
int main()
{
	int n=0,a=0;
	cin>>n;
	for(int i=1;i<=n;i++)
	{
		cin>>a;
		cout<<f(a)<<endl;
	}
	return 0;
}
int fib(int i)
{
    int a = 0, b = 1;
    while (--i) {
        a = a + b;
        swap(a, b);
    }
    return b;
}

int main()
{
    int n;
    cin >> n;
    while (n--) {
        int i;
        cin >> i;
        cout << fib(i) << endl;
    }
    return 0;
}
main()
{
    int f[20];
    int n,i,j,a;
    f[0]=1;f[1]=1;
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
        scanf("%d",&a);
        if(a==1||a==2)
            printf("1");
        else
        {
            for(j=0;j+2<a;j++)
            f[j+2]=f[j]+f[j+1];
            printf("%d\n",f[a-1]);
        }        
    }
    getchar();
    getchar();
}
main()
{
      int n,a[1000];
      a[0]=1;a[1]=1;
      scanf("%d",&n);
      int s[n];
      for(int i=0;i<n;i++)
      {
          scanf("%d",&s[i]);
      if(s[i]==1||s[i]==2)printf("%d",a[1]);
       else
      {for(int j=2;j<s[i];j++)
      {a[j]=a[j-1]+a[j-2];
      if(j==s[i]-1) printf("%d\n",a[j]);}}
       }}
int main()
{
int k;
cin>>k;
int b[k];
for(int i=0;i<k;i++)
{int a;
cin>>b[i];
double n;
n=b[i];
a=sqrt(5);
a=((pow(((1+sqrt(5))/2),n)-(pow(((1-sqrt(5))/2),n)))/sqrt(5));
cout<<a<<endl;
}
return 0;
}