import std;

alias sread = () => readln.chomp();
alias lread = () => readln.chomp.to!long();
alias aryread(T = long) = () => readln.split.to!(T[]);

void main()
{
    long n = lread();
    // writeln(n);
    auto l = new long[](100);
    l[0] = 2;
    l[1] = 1;
    // writeln(l);
    foreach (i; 2 .. n + 1)
    {
        l[i] = l[i - 1] + l[i - 2];
    }
    writeln(l[n]);
}

void scan(L...)(ref L A)
{
    auto l = readln.split;
    foreach (i, T; L)
    {
        A[i] = l[i].to!T;
    }
}
