#include<stdio.h>
int main(){
int f1=1,f2=1,f3,n;
while(scanf("%d",&n)!=EOF){
if(n<=2)
printf("%d\n", f1);
else
{
for(int i=3;i<=n;i++)
{
f3=f1+f2;
f1=f2;
f2=f3;
}
printf("%d\n", f3);
}
}
int main(){
int f1=1,f2=1,f3,n;
while(scanf("%d",&n)!=EOF){
if(n<=2)
printf("%d\n", f1);
else
{
for(int i=3;i<=n;i++)
{
f3=f1+f2;
f1=f2;
f2=f3;
}
printf("%d\n", f3);
}
}
}
3=1+2;1->2;2->3