#include <iostream>

using namespace std;

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