Problems
Dice Combinations
Dice Combinations
Your task is to count the number of ways to construct sum $n$ by throwing a dice one or more times. Each throw produces an outcome between $1$ and $6$.
For example, if $n = 3$, there are $4$ ways:
\begin{itemize}
\item $1 + 1 + 1$
\item $1 + 2$
\item $2 + 1$
\item $3$
\end{itemize}
\InputFile
One integer $n~(1 \le n \le 10^6)$.
\OutputFile
Print the number of ways modulo $10^9 + 7$.
Input example #1
3
Output example #1
4
Input example #4
4
Output example #4
8
Input example #5
5
Output example #5
16
Input example #7
7
Output example #7
63