Sum of Even-Indexed Fibonacci Numbers

Given n, add the Fibonacci numbers at even indices from 0 to n and print the sum modulo 1000000007.

Medium5MatrixMathNo attempts yetTime limit1sMemory limit256 MB

Problem

The Fibonacci numbers start with 0 and 1. The 0th Fibonacci number is 0 and the 1st is 1. From index 2 on, each Fibonacci number is the sum of the two before it.

Written as a formula, Fn=Fn1+Fn2F_n = F_{n-1} + F_{n-2} for n2n \ge 2.

The Fibonacci numbers up to n=17n = 17 are:

0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597

Given nn, compute the sum of the Fibonacci numbers whose index is even, taken over indices 0 through nn.

Input

The first line contains nn, a positive integer no larger than 101810^{18}.

Output

Print on the first line the sum of the Fibonacci numbers with an even index, over indices 0 through nn, modulo 10000000071000000007.