Dice Combinations#9036

Dice Combinations

1 second
128 megabytes
Very easy (≈850)

Count the number of ways to obtain the sum by throwing a die one or more times. Each throw gives a result from to , and the order of the throws matters.

For example, if n = 3, there are ways:

Input

One integer n~(1 \le n \le 10^6).

Output

Print one integer — the number of ways modulo 10^9 + 7.

Examples

Example 1

Loading
Loading

Example 4

Loading
Loading

Example 5

Loading
Loading

Example 7

Loading
Loading