Rachna wants to know

0

0 votes
Dynamic Programming, Easy-Medium
Problem

Rachna and Vedansh were sitting in classroom in the break.In the classroom only Rachna and Vedansh were present. Rachna has N number of trophies .

If anybody comes in , she can give him any number of trophies. she don't know how many people will come but it is sure that total number of people is N.but Now she want to distribute Trophies. but she don't want to repeat any distribution ways.

See TestCase for more understanding.

she asks Vedansh to tell that in how many ways , she can distribute the trophies ??

Rachna and Vedansh will always have some amount of trophies.

since answer can be large , print modulo 10000007.

INPUT:

Input consist of single integer N. (use fast Input reader)

OUTPUT:

Output should contain number of ways Rachna can distribute all trophies. (print modulo 10000007)

CONSTRAINTS:

2<=N<=30000

Total Number of Persons<=N

Sample Input
7
Sample Output
14
Time Limit: 1
Memory Limit: 256
Source Limit:
Explanation

All possible distributions are :

6,1

5,2

5,1,1

4,3

4,2,1

4,1,1,1

3,3,1

3,2,2

3,2,1,1

3,1,1,1,1

2,2,2,1

2,2,1,1,1

2,1,1,1,1,1

1,1,1,1,1,1,1

Editor Image

?