Processing math: 100%
Fibonacci 2 - MarisaOJ: Marisa Online Judge

Fibonacci 2

Time limit: 1000 ms
Memory limit: 256 MB
Find the nth Fibonacci number modulo 109+7. ### Input - A single line contains an integer n. ### Output - Print the nth Fibonacci number modulo 109+7. ### Constraints - 1≤n≤1018. ### Example Input: 5 Output: 5