import std.algorithm, std.container, std.conv, std.math, std.range, std.typecons, std.stdio, std.string;

void readV(T...)(ref T t){auto r=readln.splitter;foreach(ref v;t){v=r.front.to!(typeof(v));r.popFront;}}

void main()
{
  int n; readV(n);
  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];
  writeln(l[n]);
}
