Fibonacci Number

The Fibonacci numbers form a sequence where each number is the sum of the two preceding ones, starting from F(0) = 0 and F(1) = 1. Given n, calculate and return the n-th Fibonacci number. This is the classic introductory dynamic programming problem.

Examples
Input: 2
Output: 1
Hints

Fibonacci Number

The Fibonacci numbers form a sequence where each number is the sum of the two preceding ones, starting from F(0) = 0 and F(1) = 1. Given n, calculate and return the n-th Fibonacci number. This is the classic introductory dynamic programming problem.