int nextTerm(int n)
{
int a = 0,b = 1,c,e;
if (n == 2)
{
return b;
}
else if (n == 1)
{
return a;
}
else
{
for (e = 3; e <= n; e++)
{
c = a + b;
a = b;
b = c;
}
return c;
}
//if (n >= 3)
//{
// return nextTerm(n - 1) + nextTerm(n - 2);//会重复大量的计算
//}
//else if (n == 2)
//{
// return 1;
//}
//else
// return 0;
}
int main()
{
int n,i = 0;
scanf("%d", &n);
i = nextTerm(n);
printf("%d", i);
return 0;
}