Problem9644--ABC178 —— D - Redistribution

9644: ABC178 —— D - Redistribution

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

Description

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$.

Input

Input is given from Standard Input in the following format:

```
$S$
```

Output

Print the answer.

Constraints

-   $1 \leq S \leq 2000$
-   All values in input are integers.

Sample 1 Input

7

Sample 1 Output

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

Sample 2 Input

2

Sample 2 Output

0
There are no sequences that satisfy the condition.

Sample 3 Input

1729

Sample 3 Output

294867501

Source/Category