import std.stdio;
import std.string;
import std.conv;
import std.bigint;
 
void main() {
  auto N = readln.chomp.to!int;
  auto a = BigInt(2);
  auto b = BigInt(1);
  if (N == 1) {
    writeln(b);
    return;
  }
  while (N != 1) {
    auto c = a + b;
    a = b;
    b = c;
    N--;
  }
  writeln(b);
}
