n = gets.to_i a=1 b=1 for i in 2..n t=b b=a+b a=t end p b