Fibonacci sum#609

Fibonacci sum

1 second
128 megabytes
Very easy (≈850)

Let f(n) be the n-th Fibonacci number, given by

f(1) = 0, 
f(2) = 1, 
f(n) = f(n-2) + f(n-1), n > 2

Given the value of n, find f(1) + f(2) + ... + f(n).

Input

One positive integer n (n ≤ 1000).

Output

Print the value of sum modulo 10^9 + 7.

Examples

Example 1

Loading
Loading