AtCoder Beginner Contest 178
D
Redistribution
AtCoder
⌀ 875
原题
← CE →
翻译中…

Problem Statement

翻译中…

Given is an integer $S$. Find how many sequences there are whose terms are all integers greater than or equal to $3$, and whose sum is equal to $S$. The answer can be very large, so output it modulo $10^9 + 7$.

翻译中…

Constraints

翻译中…
  • $1 \leq S \leq 2000$
  • All values in input are integers.
翻译中…

Input

翻译中…

Input is given from Standard Input in the following format:

翻译中…

S

翻译中…

Output

翻译中…

Print the answer.

翻译中…

样例

Input #1
7
Output #1
3
$3$ sequences satisfy the condition: $\{3,4\}$, $\{4,3\}$ and $\{7\}$.
Input #2
2
Output #2
0
There are no sequences that satisfy the condition.
Input #3
1729
Output #3
294867501
题目信息
题号
abc178_d
时间限制
2 s
内存限制
1024 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。