#include <iostream>
using namespace std;

//第month月的兔子数:由上个月生的兔子数count_num(month-1)
//       和满足3个月大的兔子生的兔子数 count_num(month-2)
int count_num(int month)
{
    if(month==1 || month==2)
        return 1;
    return count_num(month-1)+count_num(month-2);
}
int main()
{
    int month;
    int ret;
    while(cin>>month)
    {
        cout<<count_num(month)<<endl;
    }
    return 0;
}