var n, fib_1, fib_2, fib, i;

n := read ();

fib_1 := 1;
fib_2 := 1;
fib   := 1;

for i := 2, i < n, i := i+1
do
      fib   := fib_1 + fib_2;
      fib_2 := fib_1;
      fib_1 := fib
od;

write (fib)