def fibonacci
	cache = {}
	fibo = lambda do |n|
		return 1 if n <= 1
		return cache[n] if cache.has_key?(n)

		cache[n] = fibo[n - 1] + fibo[n - 2]
	end
end

n = STDIN.gets.to_i
puts fibonacci.call(n)