N = gets.to_i dp = Array.new(N+1, 0) (1..N).each{|i| if i == 1 || i == 2 dp[i] = i else dp[i] = dp[i-1] + dp[i-2] end } puts dp[N]