n = gets.chomp.to_i
dp = [1, 2, 3]
(3...n).each { |i| dp.push(dp[i  - 2] + dp[i - 1]) }
puts dp[dp.length - 1]