Problem7670--[CSES Problem Set] Fibonacci Numbers

7670: [CSES Problem Set] Fibonacci Numbers

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 256 MiB

Description

The Fibonacci numbers can be defined as follows:
  • $F_0=0$
  • $F_1=1$
  • $F_n = F_{n-2}+F_{n-1}$
Your task is to calculate the value of $F_n$ for a given $n$.

Input

The only input line has an integer $n$.

Output

Print the value of $F_n$ modulo $10^9+7$.

Constraints

$0≤n≤10^{18}$

Sample 1 Input

10

Sample 1 Output

55

HINT

相同题目:CSES 1722

Source/Category