Pondo Fibonacci
Problem Statement
Pondo would like to know the nth Fibonacci number modulo 109+7. The nth Fibonacci number is determined by the following recurrence f(n)=f(n−1)+f(n−2) and f(1)=1,f(0)=0.
Input Format
Your first line of input will contain a single integer n.
Output Format
Output a single integer representing the nth Fibonacci number modulo 109+7.
Constraints
- 1≤n≤109
Sample Cases
10
55
1000000000
21
Explanation 2
Remember to modulo.
99999999
36891058
Comments0
No comments yet
Be the first to comment.
New comment
Log in to join the discussion.