Question
Fib Sum
You're given a number N. Compute the sum of the first N Fibonacci numbers. The Fibonacci sequence starts with the numbers 0 and 1, and each subsequent number in the sequence is the sum of the two preceding ones - 0, 1, 1, 2, 3, 5.
Input
Input consists of an integer N (1 ≤ N ≤ 40), representing the number of Fibonacci numbers to be summed up.
Output
Print a single integer representing the sum of the first N Fibonacci numbers.
Example
Input:
5
Output:
7
Explanation:
The first 5 Fibonacci numbers are: 0, 1, 1, 2, 3. Their sum is 7.
5
Output:
7
Explanation:
The first 5 Fibonacci numbers are: 0, 1, 1, 2, 3. Their sum is 7.