#include<stdio.h>
unsigned long Fibonacci(unsigned n);
int main()
{
int n;
scanf("%d",&n);
printf("%d",Fibonacci(n));
return 0;
}
unsigned long Fibonacci(unsigned n)
{
int x,y,z,i;
for(i=2,x=0,y=1;i<=n;i++)//i=2是关键
{
z=y;
y=x+y;
x=z;//x是前一位,y是后一位,x+y赋值给后一位y,后一位y赋值给前一位的x
}
return y;
}