def fib(n) a = [1, 1] for i in 2..n do a[i] = a[i-2] + a[i-1] end return a[n] end N = gets.to_i puts fib(N)