import std.stdio;
import std.array;
import std.algorithm;
import std.conv;
import std.numeric;
import std.string;

void main() {
  int N = readln.chomp.to!int;
  long[] L = new long[N + 1];

  L[0] = 2;
  L[1] = 1;
  for (int i = 2; i <= N; ++i) L[i] = L[i - 1] + L[i - 2];

  L[N].writeln;
}
