import std.stdio;
import std.conv;
import std.string;
import std.typecons;
import std.algorithm;
import std.array;
import std.range;
import std.math;
import std.regex : regex;
import std.container;
import std.bigint;


void main()
{
  auto n = readln.chomp.to!int;
  auto l = new long[](n+1);
  l[0] = 2;
  l[1] = 1;

  foreach (i; 2..n+1) {
    l[i] = l[i-1] + l[i-2];
  }

  l[n].writeln;
}
