Fibonacci numbers (1)

The Fibonacci numbers F_(n) are defined as follows:
$$F_n = \left\{
\begin{array}{ll}
0 & \mbox{if $n = 0$} \\
1 & \mbox{if $n = 1$} \\
F_{n-1} + F_{n-2} & \mbox{if $n \ge 2$}
\end{array}
\right.$$
Therefore, the first Fibonacci numbers are 0, 1, 1, 2, 3, 5, 8, 13, 21,
34, 55, …

For every given natural number n, compute F_(n) mod  10⁸ + 7.

Input

Input consists of several n. Assume 0 ≤ n ≤ 10⁵.

Output

For every given n, print F_(n) mod  10⁸ + 7.

Problem information

Author: Salvador Roura

Generation: 2026-01-25T11:43:51.594Z

© Jutge.org, 2006–2026.
https://jutge.org
