#include <iostream>

using namespace std;

int main()
{
    short n;
    cin>>n;
    unsigned long long l0 = 2, l1 = 1, lk;
    if( n == 0)
        cout<<l0;
    else{
       for (short i = 2; i <= n; i++)
        {
            lk = l0 + l1;
            l0 = l1;
            l1 = lk;
        }
        cout<<l1;
    }
}