Fibonacci Number
medium200 pts · Time limit 2000 ms · Memory limit 256 MB · Leaderboard · math,dp
Given N, print the N-th Fibonacci number (0-indexed: fib(0)=0, fib(1)=1) modulo 1000000007.
Input Format
A single integer N.
Output Format
fib(N) mod 1000000007.
Constraints
0 <= N <= 10^7
Sample 1
Input
0
Output
0
Sample 2
Input
10
Output
55
Log in to submit a solution.