semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
    int n;
    int i;
    int a[N],b;

    a[1]=1;
    a[2]=1;

    for(i=3;i<=N;i++)
    {
        a[i]=a[i-1]+a[i-2];
    }

    scanf("%d",&n);

    for(i=0;i<n;i++)
    {
        scanf("%d",&b);
        printf("%d\n",a[b]);
    }

    return 0;
}
main()
{
      int i,n;
      scanf("%d",&n);
      int a[n];
      int b[20];
      b[0]=1;
      b[1]=1;
      for (i=2;i<20;i++)
      b[i]=b[i-1]+b[i-2];
      for(i=0;i<n;i++)
      {
                      scanf("%d",&a[i]);
                      printf("%d\n",b[a[i]-1]);
      }

}
int main()
{
    int n,a,i,j;
    int c[22],b[22];
     c[1]=1;
    c[2]=1;
    for (i=3;i<22;i++)
      c[i]=c[i-1]+c[i-2];
    scanf("%d",&n);
    for (j=0;j<n;j++)
        {
          scanf("%d",&b[j]);
          printf("%d\n",c[b[j]]);
          }
  
}
int main ()
{
	int n ;
	cin >> n ;
	int bfnq [n];
    int i , j ;
    for (i=0;i<n;i++)
    	cin >> bfnq [i];//??


    int a1=1 , a2=1 ;
    for (i=0; i<n; i++)//n?????
    {	a1=1;
    	a2=1;
    	if(bfnq[i]==1||bfnq[i]==2)
    		cout <<"1"<<endl;
    	else if(bfnq[i]%2==1)
    		   {
    			for (j=3; j<=bfnq[i]; j+=2)

    			   	 {
    			   	  a1=a1+a2;
    			   	  a2=a1+a2;
    			   	 }
    		   	 cout << a1<<endl ;
    		   }
    	else
    	{
    		for(j=3; j<=bfnq[i]; j+=2)
    		{
    			a1=a1+a2;
    			a2=a1+a2;
    		}
    		cout << a2 << endl ;
    	}
    }

    return 0;
}
int main() {
	int m,x,a=1,b=1,k1,k2,n;//m??????? a?an-1 b?an-2 x?an k???  n??n??
	cin >>m;
	for (k1=1;k1<=m;k1=++k1)
	{	cin >>n;
		a=1;b=1;
		if(n==1) cout<<1<<endl;
		if(n==2) cout<<1<<endl;
		if(n>=3)
		{for (k2=3;k2<=n;++k2)
			{x=a+b;
			b=a;
			a=x;}
		cout <<x<<endl;}}
	return 0;
}
int main()
{
	int n, i, a, j, f[21] = {0, 1, 1};
	cin >> n;
	for (i = 0; i < n; i++)
	{
		cin >> a;
		if (a == 1 || a == 2)
		{
			cout << 1 << endl;
			continue;
		}
		for (j = 2; j < a; j++)
			f[j + 1] = f[j] + f[j - 1];
		cout << f[j] << endl;
	}
	return 0;
}
int main(){
	int n,a[1000],b[1000],p,q,i,k,j;
	scanf("%d",&n);
	'\n';
	for(i=0;i<n;i++){
		scanf("%d\n",&a[i]);
	}
	for(i=0;i<n;i++){
		p=1;
		q=1;
		for(k=2;k<a[i];k++){
			j=p+q;
			p=q;
			q=j;
		}
		b[i]=q;
	}
	for(i=0;i<n-1;i++){
		printf("%d\n",b[i]);
	}
	printf("%d",b[n-1]);
	return 0;
}
int FN(int n);
int main()
{
	int n,i;
	int a[20];
	int m[20];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&a[i]);
	}
	for(i=0;i<n;i++){
		m[i]=FN(a[i]);
	}
	for(i=0;i<n;i++){
		printf("%d\n",m[i]);
	}
	return 0;
}

int FN(int n){
	if(n==2||n==1){
		return 1;
	}
	if(n>2){
		return FN(n-1)+FN(n-2);
	}
}
int f(int i)
{
 int a[20];
 if(i==0)
 return 1;
 else if(i==1)
 return 1;
 else
 {
 a[i]=f(i-1)+f(i-2);
 return a[i];
 }
}
main()
{
 int n,i,b[20];
 scanf("%d",&n);
 for(int k=0;k<n;k++)
 {
  scanf("%d",&b[k]);
  printf("%d\n",f(b[k]-1));

 }

}
int f(int n)
{
    int k;
    if(n==1||n==2)
    k=1;
    else
    k=f(n-1)+f(n-2);
    return k;
}
main()
{
      int n,i,k;
      scanf("%d",&n);
      for(i=1;i<=n;i++)
      {
           scanf("%d",&k);
           printf("%d\n",f(k));
      }
      getchar();
      getchar();
      return 0;
}
int main()
{
	int i;
	int a[25];
	a[0] = 1;
	a[1] = 1;
	for(i = 2;i < 25;i++)
	{
		a[i] = a[i-1]+a[i-2];
	}
	int n;
	int s;
	cin >>s;
	for(i = 0;i<s;i++)
	{
		cin >> n;
	cout << a[n - 1]<<endl;
	}
	return 0;
}
int main()
{
	int n,i,c,d,e;
	cin >>n;
	const int N=n;
	int a[N];
	for(i=0;i<=N-1;i=i+1){
		cin>>a[i];
	}
	for(i=0;i<=N-1;i=i+1){
	  for(e=1,c=1,d=1;e<=a[i]-2;e=e+2){
		  c=c+d;
		  d=c+d;
	 }
	  if(a[i]%2==1){
	  		 cout<<c<<'\n'<<endl;
			}
	  else {
		  cout<<d<<'\n'<<endl;
	  }
	}
	return 0;

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

	return 0;
}

int f(int n){
	if(n==0){
		return 1;
	}
	if(n==1){
		return 1;
	}
	if(n>1){
		return f(n-1)+f(n-2);
	}
}
//*************************
//*  ????????? 
//*  ????? 
//*  ???1200012941 
//*  ???2012?9?24? 
//*************************

int digui(int a)
{
    if (a == 1)
    {
       return 1;
    }
    if (a == 2)
    {
        return 1;
    }
    if (a > 2)
    {
        return digui(a - 1) + digui(a - 2);
    }
}

int main()
{
    int i, n, a;
    cin >> n;
    for (i = 0; i < n; i++)
    {
        cin >> a;
        cout << digui(a) << endl << endl;
    }
    return 0;
}
int main()
{
int f[25]={0,1,1},n,a[20],i,j;
for(i=3;i<=25;i++) 
   {
      f[i]=f[i-1]+f[i-2];
   }
scanf("%d",&n);
for(j=0;j<n;j++)
   {
      scanf("%d",&a[j]);
      printf("%d\n",f[a[j]]);
   }
return 0;
}
int F(int m)
{ 
if(m==1||m==2) return 1;
else 
{return F(m-1)+F(m-2);}
}

int main()
{int Z,a[23],i;
cin>>Z;
for(i=1;i<=Z;i++)
{cin>>a[i]; 
}
for(i=1;i<=Z;i++)
{cout<<F(a[i])<<endl;
                 }
 
 return 0;
}
int main()
{
	int n, a, b, c, i, m;
	cin >> n;
	for (; n > 0; n--)
	{
		cin >> m;
		a = 1, b = 1;
		if (m <= 2)
		{
			cout << 1;
			continue;
		}
		for (i = 3; i <= m; i++)
		{
			c = a + b;
			a = b;
			b = c;
		}
		cout << c << endl;
	}
	return 0;
}
int main()
{
  int a,b,c,i,k,n,m;
  a=1;
  b=1;
  scanf("%d\n",&n);
  int u[n];
  for(i=1;i<=n;i++)
  {scanf("%d\n",&m);
  if(m<=2) c=1;
  else   a=1;b=1; for(k=3;k<=m;k++)
     {
      c=a+b;
      a=b;
       b=c;
  }
   u[i]=c;
  }
  for(i=1;i<=n;i++)
	  printf("%d\n",u[i]);
   
  return 0;
}
int main() {
	int n,i,j,a[1000],s[1000],b[1000];
	scanf("%d",&n);
	for (i=0;i<n;i++){
		scanf("%d",&a[i]);
	}
	for(i=0;i<n;i++){
		s[i]=0;	
		b[0]=1;
		b[1]=1;
		for(j=2;j<a[i];j++){
			b[j]=b[j-1]+b[j-2];
		}
		for(j=0;j<a[i];j++){
			s[i]+=b[j];
		}
	printf("%d\n",b[j-1]);
	}
	return 0;
}
int main ()
{
int n=0,i=0,x=1,m=1,t=1,s=0;
cin>>n;
int a[10];
for(i=0;i<n;i+=1)
{
	cin>>a[i];}
for(i=0;i<n;i+=1)
{
 for(x=2;x<a[i];x+=1)
    	  {s=m+t;
    	  m=t;
    	  t=s;}

      cout<<t<<endl;
      m=1,t=1,s=0;
}
return 0;
}
//********************************
//*??  ??????        *****
//*????? 1300012753     ***** 
//*???2013.11.20          *****   
//********************************
int cal(int i)
{
	int ans;
	if(i == 1 || i == 2)
	ans = 1;
	else
	{
		ans = cal(i - 1) + cal(i - 2);
	}
	return ans;
}
int main()
{
	int n;
	cin >> n;
	int a[100];
	for(int i = 1; i <= n; i++)
	{
		int t;
		cin >> t;
		a[i] = cal(t); 
	}
	for(int i = 1; i <= n; i++)
	cout << a[i] << endl;
	return 0;
}
main()
{
  int n,t,i,Y;
  scanf("%d",&n);
  int s[n];
  for(i=0;i<=(n-1);i++)
  {
    scanf("%d",&t);
    s[i]=t;
  }
  for(i=0;i<=(n-1);i++)
  {
    int a=1,b=1,c=1;
    for(Y=3;Y<=s[i];Y++)
    {
    c=a+b;
    a=b;
    b=c;
    }
    printf("%d\n",c);
  } 
  getchar();
  getchar();
  getchar();
  getchar();
}
void main()
{
	int n,a[100],f1,f2,i,t,j;
	scanf("%d",&n);
	for (i=0;i<n;i++)
		scanf("%d",&a[i]);
    for (i=0;i<n;i++)
	{   f1=1;
	    f2=1;
		for (j=2;j<a[i];j++)
		{
			t=f1;
			f1=f2;
			f2=f2+t;
		}
	printf("%d\n",f2);}

}
int main()
{
 int F(int);             //??????k????
 int n;                  //n????????
 cin>>n;
 for(int i=1;i<=n;i++)
 {
  int k;
  cin>>k;
  cout<<F(k)<<endl;
 }
 return 0;
}
int F(int k)
{
if(k==1||k==2)
 return 1;
 int a=1,b=1,c;
 for(int i=3;i<=k;i++)
 {
  c=a+b;                     //??????????c?
  a=b;b=c;
 }
 return b;
}
void main()
{
	int i,m,n,a[20]={1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765};
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&m);
		printf("%d\n",a[m-1]);
	}
}
main()
{
      int n,i,a,j;
      scanf("%d",&n);
      for(i=0;i<n;i++)
      {
                      scanf("%d",&a);
                      int b[20]={0};
                      b[0]=1;
                      b[1]=1;
                      if(a<=2)
                      {
                                    printf("%d\n",b[a-1]);
                      }
                      else
                      {
                          for(j=2;j<a;j++)
                          {
                                          b[j]=b[j-1]+b[j-2];
                          }
                          printf("%d\n",b[a-1]);
                      }
      }                
      getchar();                
      getchar();                
      
}
int main()  
{    
	int a[20],b[10];
	int i,j,n;
	a[0]=1;
	a[1]=1;
	for(i=2;i<=19;i++)
	{
		a[i]=a[i-1]+a[i-2];
	}
	cin>>n;
	for(i=0;i<n;i++)
	{
		cin>>j;
		b[i]=a[j-1];
		cout<<b[i]<<endl;
	}
	
	
	
	return 0;              
}             // ?????
int main()
{
   int n,m[20],a,j,i,b,c;
  
   scanf("%d",&n);
   for(i=1;i<n+1;i++)
   {
	   a=1;
       b=1;
	   scanf("%d",&(m[i]));
	   if(m[i]>2)
	   {
	       for(j=3;j<m[i]+1;j++)
		   {
              c=b;
			  b=a;
			  a=b+c;

		   } 
		   printf("%d\n",a);
	   }
	   else 
	   {
		   a=1;
		   printf("%d\n",a);

	   }

   }

  
   return 0;

}
int dd(int n)
{
	int i,z;
	if(n==1||n==2)
		z=1;
	else
	z=dd(n-1)+dd(n-2);

	return z;

}

int main()
{
	int m,i,a,b;
	scanf("%d",&m);
	for (i=0;i<m;i++)
	{
	scanf("%d",&a);
	printf("%d",dd(a));
	if (i<m-1)
		printf("\n");
	}

}
int x;
int f(int n)
{
	if (n == 1 || n == 2)
	{
		x = 1;
	}
	else
	{
		x = f(n - 1) + f(n - 2);
	}
	return x;
}
int main()
{
	int n, i, a;
	cin >> n;
	for (i = 1; i <= n; i++)
	{
		cin >> a;
		cout << f(a) << endl;
	}
	return 0;
}
int main()
{
	int a1,a2,a3,i,j,p,n,t;
	cin>>n;
	for (i=0;i<n;i++)
	{
		a1=1;
		a2=1;
		cin>>p;
		if(p==1||p==2) cout<<"1"<<endl;
		else 
		{
		   for(j=2;j<p;j++)
		   {
			   a3=a1+a2;
			   t=a3;
			   a1=a2;
			   a2=t;
		   }
		   cout<<a3<<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){
int i;
int d=1;
int e=1;
int g=2;
if(a==1||a==2){
return 1;
}else if(a==3){
return 2;
}else {
for(i=4;i<=a;i++){
d=e;
e=g;
g=d+e;
}
return g;
}
}
int main(){
	int n,i,j,a[10000]={1,1},sz[10000];
    scanf("%d",&n);
	for(i=0;i<n;i++){
        scanf("%d",&sz[i]);
	}
	for(i=0;i<n;i++){
	    for(j=0;j<sz[i];j++){
			a[j+2]=a[j+1]+a[j];			
        }
		printf("%d\n",a[sz[i]-1]);
	}
	return 0;
}
int main()
{
    int n,f[20],a[20],i;
    f[0]=1;
    f[1]=1;
    for(i=2;i<=19;i++)
      f[i]=f[i-1]+f[i-2];
      cin>>n;
      for(i=0;i<=n-1;i++)
        cin>>a[i];
      for(i=0;i<=n-1;i++)  
    cout<<f[a[i]-1]<<endl;    
  return 0;  
    }
/*
 * fib.cpp
 *
 *  Created on: 2012-10-21
 *      Author: Administrator
 */

int fib(int i){					//?????????????
	if (i==1||i==2) return 1;
	else return (fib(i-1))+fib((i-2));	
}                                  //???????????????????
int main (){
	int n,i,a[20];				//??????????
	cin>>n;
	for (i=0;i<n;i++)
		cin>>a[i];
	for (i=0;i<n;i++)
		cout<<fib(a[i])<<endl;		//???????
	return 0;
}
int f(int k);
int main(){
	int s[1000],i,n,k;
	scanf("%d\n",&n);
	for(i=0;i<n;i++){
		scanf("%d\n",&s[i]);
		k=s[i];
		printf("%d\n",f(k));
	}
	return 0;
}
int f(int k){
	if(k==1||k==2){
		return 1;
	}else{
		return f(k-1)+f(k-2);
	}
}
main()
{
 int a[21],i,n,b[21];
 a[1]=1;
 a[2]=1;
 for(i=3;i<=20;i++)
 {
  a[i]=a[i-1]+a[i-2];                 
 }      
 scanf("%d",&n);
 for(i=1;i<=n;i++)
 {
  scanf("%d",&b[i]);                 
 }
 for(i=1;i<=(n-1);i++)
 {
  printf("%d\n",a[b[i]]);                
 }
 printf("%d",a[b[n]]);
}
int f(int a)
{
 if(a==1||a==2)
 return 1;
 else
 return f(a-1)+f(a-2);
}
main()
{
 int n;
 scanf("%d",&n);
 int i;
 int a;
 for(i=0;i<n;i++)
 {
  scanf("%d",&a);
  printf("%d\n",f(a));
 }
 getchar();
 getchar();
}
int main (){
	int n,i,a,j,b[100];
    scanf("%d",&n);
   for(i=0;i<n;i++){
	   scanf("%d",&a);
	   for(j=0;j<100;j++){
		   if(j==0||j==1){b[j]=1;}
		   else {b[j]=b[j-1]+b[j-2];}
	   }
       printf("%d\n",b[a-1]);
   }
  return 0;
}
int f(int n)
{
    if(n==1||n==2)
    return 1;
    else return f(n-1)+f(n-2); 
}
int main()
{
    int i,n,a[10000],result[1000];
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
        scanf("%d",&a[i]);
        result[i]=f(a[i]);
        printf("%d\n",result[i]);
    }
}
int main() {
	int n=0;
	int a=0;
	int x=1;
	int y=1;
	int z=0;
	int j=0;
	cin>>n;
	for(int b=1;b<=n;b=b+1)
	{
		cin>>a;
	    for(int i=1;i<=a;i=i+1)
	    {
	    	j=i%3;
	        if(j==2)
	        	y=x+z;
		    if(j==1)
			    x=y+z;
		    if(j==0)
			    z=x+y;
	    }
	    int b=0;
	    int c=0;
	    b=max(x,y);
	    c=max(b,z);
	    cout<<c<<endl;
	    x=1;
	    y=1;
	    z=0;
	}
	return 0;
}
void main()
{
	int n,i,j,k;
	int str[100]={0};
	str[1]=1;
	str[2]=1;
	int a=0;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&a);
		if(a==1||a==2)
			printf("1\n");
		else
		{
		for(j=3;j<=a;j++)
			str[j]+=str[j-1]+str[j-2];
		printf("%d\n",str[a]);
		for(k=3;k<=a;k++)
			str[k]=0;
		}
	}
		
}
void main()
{
	int n,a[21],b[21],j,i;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		scanf("%d",&a[i]);
		b[1]=1;
		b[2]=1;
		for(j=3;j<=a[i];j++)
		{ 
         b[j]=b[j-1]+b[j-2];
		}
		printf("%d\n",b[a[i]]);
	}
}
int f(int n){
    int result;
    if(n==1||n==2) return 1;
    else{
        result=f(n-1)+f(n-2);
        return result;
        } 
    }
int main(){
    int n,t,i;
    scanf("%d",&t);
    for(i=0;i<t;i++){
        scanf("%d",&n);
        printf("%d\n",f(n));
        }
    
    
    
    scanf("%d",&n);
    return 0;
    }
int main(){
    int n,a=1,b=1,sz[20],i,c=0,j;
    scanf("%d",&n);
    for(i=0;i<n;i++){
        scanf("%d",&sz[i]);
    }
    for(i=0;i<n;i++){
        if(sz[i]<=2){
            b=1;
            printf("%d\n",b);
        }
        else{
            for(j=0;j<sz[i]-2;j++){
                c=b;
                b=a+b;
                a=c;
            }
            printf("%d\n",b);
        }
        a=1;
        b=1;
    }
    return 0;

}
int main() {
	int zu;
	cin >> zu;
	for(int i=1;i<=zu;i++){
		int j;cin>>j;
		switch (j){
		case 1: cout << 1 << endl;break;
		case 2: cout << 1 << endl;break;
		default:{int x1=1,x2=1;
			for(int k=3;k<=j;k++){
				x2=x1+x2;x1=x2-x1;
		}
			cout << x2 << endl;
		}
	}
	}
	return 0;
}
//2013.11.23
//zwb

int n, i, j = 1, m;
int num[21] = {0};
int fib(int m)
{
	if(m == 1 || m == 2)
		return 1;
	else
		return fib(m - 1) + fib(m - 2);
}

int main ()
{
	cin >> n;
	for(i = 1; i <= n; i++)
	{
		cin >> m;
		num[m] = fib(m);
		cout << num[m] << endl;
	}
	return 0;
}
/*
 * 1.cpp
 *
 *  Created on: 2013-10-11
 *      Author: ??
 */

int main()
{
	int n;
	cin >> n;
	int a, sj, hc, q1;
	for (int i=1;i<=n;i++)
	{
		q1 = 1;
		sj = 1;
		cin >> a;
		for (int j=3;j<=a;j++)
		{
			hc = sj;
			sj = sj+q1;
			q1 = hc;
		}
		cout << sj << endl;
	}
	return 0;
}
/*
title: ??????
function: ?????????????: ?????????????1????????????2????? 
???????a???????????a??????
*/
int main()
{
    int f[20]={1,1},i,n,result[20],a;
    for (i=2;i<20;i++)    //calculate f series
    {
        f[i]=f[i-2]+f[i-1];
        }
    cin>>n;
    for (i=0;i<n;i++)
    {
        cin>>a;
        result[i]=f[a-1];
        }
    for (i=0;i<n;i++)
    {
        cout<<result[i]<<endl;
        }
}
int main(){
    int n,a;
    int sz[20];
    scanf("%d",&n);
    for(int hang=1;hang<=n;hang++){
		scanf("%d",&a);
		sz[0]=1;
		sz[1]=1;
		for(int i=2;i<a;i++){
			sz[i]=sz[i-1]+sz[i-2];
		}
		printf("%d\n",sz[a-1]);
	}

	return 0;
}
/*??????
???   1200012876
2012?10?16?22:36:30   */
int main(){
int  n,a[1000],b[1000],N[1000];    //?????? 
cin>>n;     //????n 
for(int j=1;j<=n;j++)    
{
cin>>b[j];   //???????
if (b[j]<3)cout<<"1"<<endl; //????????3????1??? 
else                        //???3??????? 
    {for(int i=3;i<=b[j];i++)
    {
        a[1]=1,a[2]=1;
        a[i]=a[i-1]+a[i-2];
        }
        N[j]=a[b[j]];      //?a[????]?N[j] 
        cout<<N[j]<<endl;  //?? N[j] 
        }}
        return 0;
}
/*
 *  Name?fenli.cpp
 *
 *  Created on: 2012-10-16
 *  Author: 00948343_??
 *  Function??????????
 */



int main(){
	int n, count, sum1=0, sum2=0, sum3=0;
	cin >> n;
	for (int i=0;i<n;i++){
		cin >> count;
		for (int j=0;j<count;j++){
			if (j==0){
				sum1=1;
				sum2=1;
				sum3=1;
			}
			else if (j==1){
				sum1=1;
				sum2=1;
				sum3=1;
			}
			else{
				sum1=sum2;
				sum2=sum3;
				sum3=sum1+sum2;
			}
		}
		cout << sum3 <<'\n';
		sum3=0, sum1=0, sum2=0;
	}
}
int main(){
	int a[5000],b[1000];
	int i,n,k;
	scanf("%d",&k);
	a[0]=1;
	a[1]=1;
	for(i=0;i<1000;i++){
		a[i+2]=a[i+1]+a[i];
	}
	for(i=0;i<k;i++){
	    scanf("%d",&b[i]);
	}
	 for(i=0;i<k-1;i++){
	     printf("%d\n",a[b[i]-1]);
	}
	 printf("%d",a[b[k-1]-1]);
	return 0;
}
int main()
{
	int n,i=0,j=2,p,q,r;
	int m[100],t[100];
	scanf("%d\n",&n);
	for(i=0;i<n-1;i++)
	{
		scanf("%d\n",&m[i]);
	}
	scanf("%d",&m[n-1]);
	i=0;
	for(i=0;i<n;i++)
	{
		if(m[i]==1||m[i]==2)
		{
			t[i]=1;
		}
		if(m[i]>2)
		{
			p=1;
			q=1;
			for(j=2;j<m[i];j++)
			{
				r=q;
				q=p+q;
				p=r;
			}
			t[i]=q;
			j=2;
		}
	}
	i=0;
	for(i=0;i<n-1;i++)
	{
		printf("%d\n",t[i]);
	}
	printf("%d",t[n-1]);
	return 0;
}
int main()
{
	int n=0,a=0,i=0,j=0;
	int f[30];
	for(i=0;i<30;i++)
		f[i]=0;
	cin>>n;
	for(i=1;i<=n;i++)
	{
		f[1]=1;
		f[2]=1;
		cin>>a;
		if(a==1||a==2)
			cout<<1<<endl;
		else
		{
			for(j=3;j<=a;j++)
				f[j]=f[j-1]+f[j-2];
			cout<<f[a]<<endl;
		}
	}
	return 0;
}
int main()
{
    int n,maxi;
    cin >> n;
    int m[n];
    maxi = 0;
    for (int i = 0; i <= n - 1;i++)
    {
        cin >> m[i];
        maxi = max (m[i],maxi);
    }
    int a[maxi];
    a[0] = 1;
    a[1] = 1;
    for (int j = 2; j <= maxi - 1; j++)
    {
        a[j] = a[j - 1] + a[j - 2];
    }
    for (int k = 0; k <= n - 1; k++)
    {
        cout << a[m[k] - 1] << endl;
    }
    return 0;
}
int main(){
int n,a;
scanf("%d",&n);
int i,t,I;
int c[10000];
int k=0;
for(I=0;I<n;I++){
	int x=1;
    int sum=1;
	scanf("%d",&a);
	if((a==2)||(a==1)){
		c[k]=1;
		k++;
	}else if(a>2){
		for(i=3;i<=a;i++){
			t=sum;
			sum=sum+x;
			x=t;
		}
		c[k]=sum;
		k++;
	}
}int j;
for(j=0;j<k;j++){
	printf("%d\n",c[j]);}
    return 0;
}
int main()
{
    int n,a[20],i,m;
    scanf("%d",&n);
    a[0]=1;
    a[1]=1;
    for(i=2;i<20;i++)
    {
                     a[i]=a[i-1]+a[i-2];
    }
    for(i=0;i<n;i++)
    {
                    scanf("%d",&m);
                    printf("%d\n",a[m-1]);
    }
    getchar();
    getchar();
}
int main()
{
	int one = 1, two = 1;
	int count;
	int num;
	int i;
	int sum;
	scanf("%d", &count);
	while (count --) {
		scanf("%d", &num);
		if (num == 1 || num == 2) {
			printf("1\n");
			continue;
		}
		num -= 2;
		one = 1, two = 1;
		sum = 0;
		for (i = 0; i < num; i ++) {
			sum = one + two;
			one = two;
			two = sum;
		}
		printf("%d\n", sum);
	}
	return 0;
}
int main()
{
	int n;
	cin >> n;
	while (n --)
	{
		int num;
		cin >> num;
		if (num == 1 || num == 2)
			cout << "1" << endl;
		else
		{
			int f1, f2, result;
			f1 = 1;
			f2 = 1;
			while (num > 2)
			{
				result = f1 + f2;
				f1 = f2;
				f2 = result;
				num --;
			}
			cout << result << endl;
		}
	}
	return 0;
}
int main(){
	int a,b,n,i,j,z[100],x[100];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&(z[i]));
	}
	for(i=0;i<n;i++){
		for(j=1;j<=z[i];j++){
			if(j==1){
				a=1;
				x[i]=a;
			}
			if(j==2){
                b=1;
				x[i]=b;
			}
			if(j>2){
                x[i]=a+b;
				a=b;
				b=x[i];
			}
		}
	}
	for(i=0;i<n;i++){
		printf("%d\n",x[i]);
	}
	return 0;
}
int f(int x)
{
    int n;
    if(x==1||x==2)
       n=1;
    else
       n=f(x-1)+f(x-2);
    return n;
}
main()
{
      int n,x;
      scanf("%d",&n);
      int i,j;
      for(i=0;i<n;i++)
      {
                      scanf("%d",&x);
                      printf("%d\n",f(x));
      }
}
int main()
{
	int n = 0;
	int a = 0;
	int i = 0;
	int tmp1 = 1;
	int tmp2 = 1;
	int tmp;

	scanf("%d", &n);

	while (n--) {
		scanf("%d", &a);

		if (a <= 2) {
			printf("1\n");
		}
		else {
			for (i = 2; i < a; i++) {
				tmp = tmp2;
				tmp2 = tmp1 + tmp2;
				tmp1 = tmp;
			}
			printf("%d\n", tmp2);
		}
		tmp1 = 1;
		tmp2 = 1;
	}
	return 0;
}
int main(){
	int n,i,k,m,s;
	int a[100],sz[100];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&a[i]);
	}
   	for(i=0;i<n;i++){
		m=a[i];
        sz[0]=1;
        sz[1]=1;
		if(m==1)
			s=1;
		if(m==2)
			s=1;
		if(m!=1&&m!=2){
			s=0;
		    for(k=2;k<a[i];k++){
				sz[k]=sz[k-1]+sz[k-2];
                s=sz[k];
			}
		}
		printf("%d\n",s);
	}
	return 0;
}
int fei (int a)
{
    int t;
    if (a==1)
    return 1;
    if (a==2)
    return 1;
    if ( a!=1 && a!=2 )
    {
         t=fei (a-1)+fei (a-2);
         return t;
    }
}
int main ()
{
    int n,i;
    int t[20];
    scanf ("%d",&n);
    for (i=0;i<n;i++)
    {
        scanf ("%d",&t[i]);
    }
    for (i=0;i<n;i++)
    {
        printf ("%d\n",fei(t[i]));
    }
    getchar ();
    getchar ();
}
int f(int n)
{
	int c;
	if (n==1||n==2)
		c=1;
	else c=f(n-1)+f(n-2);
	return (c);
}
void main()
{
	int i,m,n,*p;
	p=(int *)malloc(20*sizeof(int));
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d",p+i);
	for(i=0;i<n;i++)
	{m=f(*(p+i));
	printf("%d\n",m);
	}
}
int num[100000] = {0};
int f(int n)
{
	if(num[n]>0)
		return num[n];
	else
		return(f(n-1)+f(n-2));
}
int main()
{
	int n;
	cin >> n;
	int a;
	int out;
	num[1] = 1;
	num[2] = 1;
	while(n--)
	{
		cin >> a;
		if(a==1 || a==2)
			cout << 1 << endl;
		else
		{
			out = f(a);
			cout << out << endl;
		}
	}
	return 0;
}
int main()
{
	int n,i,a[100]={0};
	unsigned long f[25]={0};

	scanf("%d",&n);
	
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
	}

	f[0]=1;
	f[1]=1;
	for(i=2;i<20;i++)
	{
		f[i]=f[i-1]+f[i-2];
	}
	
	
	for(i=0;i<n;i++)
	{
		printf("%d\n",f[a[i]-1]);
	}
	return 0;
}
int main(){
int n,i,a,d,k,p,q;
scanf("%d",&n);
for(i=0;i<n;i++){
	scanf("%d",&a);
	p=1;
	q=1;
	if(a==1||a==2){
		printf("%d\n",q);
	}
	else if(a>2){
		for(k=0;k<a-2;k++){
		d=p+q;
		p=q;
		q=d;
		}
     	printf("%d\n",q);

	}
}
 return 0;
}
int mem[30]={0,1,1};
int fib(int a)
{
	if(a<=2)return 1;
	if(mem[a]!=0)return mem[a];
	int result;
	result=fib(a-1)+fib(a-2);
	mem[a]=result;
	return result;
}
int main()
{
	int n,a,i;
	cin>>n;
	for(i=1;i<=n;i++)
	{
		cin>>a;
		cout<<fib(a)<<endl;
	}
	return 0;
}
int main(){
    int n,i,j,max,tran;
    scanf("%d",&n);
    int a[n];
    for(i=0;i<n;i++){
        scanf("%d",&a[i]);
    }
    max=a[0];
    for(i=0;i<n;i++){
        if(a[i]>max){
            max=a[i];
        }
    }
    int F[max+3];
    F[0]=1;
    F[1]=1;
    for(i=0;i<max;i++){
        F[i+2]=F[i]+F[i+1];
    }
    for(i=0;i<n;i++){
        printf("%d\n",F[a[i]-1]);
    }
    return 0;
}
int feibo(int m)
{
    if (m==1||m==2)
       return 1;
    else 
       return feibo(m-1)+feibo(m-2);
}
    
int main(int argc, char *argv[])
{
  int n,i,place;
  scanf("%d",&n);
  for (i=0;i<=n-1;i++)
  {
      scanf("%d",&place);
      printf("%d\n",feibo(place));
  }	
  return 0;
}
void main()
{
	int t,i,j;
	int a[10][21];
	scanf("%d\n",&t);
	for(i=0;i<t;i++)
		scanf("%d\n",*(a+i));
	for(i=0;i<t;i++)
	{
		*(*(a+i)+2)=1;
		*(*(a+i)+1)=1;
		for(j=3;j<=**(a+i);j++)
			*(*(a+i)+j)=*(*(a+i)+j-1)+*(*(a+i)+j-2);
		printf("%d\n",*(*(a+i)+--j));
	}	
}
int Fibonacci(int x);
int main()
{
	int n,a[100];
	int i,num[100];
	scanf("%d",&n);
	for (i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
		num[i]=Fibonacci(a[i]);
	}
	for (i=0;i<n;i++)
	{
		printf("%d\n",num[i]);
	}
	return 0;
}
int Fibonacci(int x)
{
	int result=0;
	if (x==1 ||x==2)
	{
		result=1;
		return result;
	}
	else
	{
		result=Fibonacci(x-1)+Fibonacci(x-2);
		return result;
	}
}
int f(int n)
{
    int c;
    if(n==1||n==2)
    {
    c=1;
    return c;
}
    else
    {
        c=f(n-1)+f(n-2);
    }
    return c;
}
main()
{
      int a[10000],n,i;
      scanf("%d",&n);
      for(i=0;i<n;i++)
      {
                      scanf("%d",&a[i]);
                      printf("%d\n",f(a[i]));
      }
      getchar();
      getchar();
}
int main(){
int a,b,c,i,j,n;
int z[100],m[100];
scanf("%d",&n);
for(i=0;i<n;i++){
	scanf("%d",&z[i]);
	a=1;
	b=1;
    if(z[i]==1){
		m[i]=1;
	}else{
		if(z[i]==2){m[i]=1;}
		else{for(j=0;j<(z[i]-2);j++){m[i]=a+b;a=b;b=m[i];}}}}
 for(i=0;i<n;i++){
	  printf("%d\n",m[i]);
  }
  return 0;
}
int F(int x)
{
	if (x == 2 || x == 1)
		return 1;
	return F(x - 1) + F(x - 2);
}

int main()
{
	int a, n;
	cin >> n;
	for(; n > 0; n--)
	{
		cin >> a;
		cout << F(a) << endl;
	}
}
int main()
{
	int n,f[21],a[21],i;
	scanf("%d",&n);
	for (i=1;i<=n;i++) 
		scanf("%d",&a[i]);
	f[1]=1;
	f[2]=1;
	for (i=3;i<=20;i++)
		f[i]=f[i-1]+f[i-2];
	for (i=1;i<=n;i++)
		printf("%d\n",f[a[i]]);
	return 0;
}
int main(){
int n,a,sz[30],i,j,t,e;
i=1;
j=1;
sz[0]=1;
sz[1]=1;
for(t=2;t<30;t++){
	sz[t]=i+j;
	e=i;
	i=i+j;
	j=e;
}
scanf("%d",&n);
for(t=0;t<n;t++){
	scanf("%d",&a);
	printf("%d\n",sz[a-1]);
}
return 0;
}