#C. D - Redistribution

    传统题 1000ms 256MiB

D - Redistribution

该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。

D - Redistribution

Score : $400$ points

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:

SS

Output

Print the answer.


7
3

$3$ sequences satisfy the condition: $\{3,4\}$, $\{4,3\}$ and $\{7\}$.


2
0

There are no sequences that satisfy the condition.


1729
294867501

2024寒假入门组刷题营(十二)

未参加
状态
已结束
规则
ACM/ICPC
题目
8
开始于
2024-2-12 13:30
结束于
2024-2-12 15:30
持续时间
2 小时
主持人
参赛人数
10