program namu_dazymas;

  function f(n: integer): integer;
    var i, tarp, pirmas, antras: integer;
  begin
    pirmas := 1; antras := 1;
    for i := 1 to n do
      begin
        tarp := pirmas + antras;
        pirmas := antras;
        antras := tarp;
      end;
    f := antras;
  end; { f }

  var n: integer;
begin
  readln (n);
  writeln (f(n));
end.