#include <stdio.h>
#include <string.h>
//斐波那契递归
int f(int n);
int main()
{
int n;
while ((scanf("%d", &n)) != EOF)
printf("%d\n", f(n));
return 0;
}
int f(int n)
{
int ret=0;
if (n == 1)
ret = 1;
else if (n == 2)
ret = 1;
else if (n == 3)
ret = 2;
else{
ret=f(n-1)+f(n-2);
}
return ret;
}