void main(){
  import std.stdio, std.string, std.conv, std.algorithm;

  int n; rd(n);
  auto a=new long[](100);

  a[0]=2; a[1]=1;
  for(int i=2; i<=n; i++){
    a[i]=a[i-1]+a[i-2];
  }

  writeln(a[n]);
}

void rd(T...)(ref T x){
  import std.stdio, std.string, std.conv;
  auto l=readln.split;
  assert(l.length==x.length);
  foreach(i, ref e; x){
    e=l[i].to!(typeof(e));
  }
}