59. Fibonacci (easy version)

Time Limit: 1 seconds

Memory Limit: 128 MB

Rating: 1200

Problem Statement

Output the $N$-th number in the Fibonacci sequence modulo $10^9+7$, where term $0$ is $0$ and term $1$ is $1$. $(0 \le N \le 10^4)$

Input

The first line has integer $N$.

Output

Output the answer.

Sample Cases
Sample Input 1:
0

Sample Output 1:
0


Sample Input 2:
10

Sample Output 2:
55
Explanation

https://en.wikipedia.org/wiki/Fibonacci_sequence

Sources

IanOJ Contest #1 (Div. 3) > Problem E1

Submit | Back