
import std.stdio, std.string, std.conv;
 
long [100] L;
 
long foo(int n) {
if(L[n]==0) {
L[n]= foo(n-1) + foo(n-2);
}
return L[n];
}
 
void main() {
int N = readln().chomp().to!(int);
L[0]=2;L[1]=1;
writeln(foo(N));
}