import std.stdio, std.string, std.conv;

long [] L;

long foo(int n) {
if(L.length <= n) {
L ~= foo(n-1) + foo(n-2);
}
return L[n];
}

void main() {
int N = readln().to!(int);
L ~= [2,1];
writeln(foo(N));
}