Integer Partition


Submit solution

Points: 1
Time limit: 1.0s
Memory limit: 256M

Problem type
Allowed languages
C++, Python

Integer Partition

A positive integer n can be represented as the sum of several positive integers: n = n1 + n2 + … + nk, where n1 ≥ n2 ≥ … ≥ nk, k ≥ 1.

Such a representation is called a partition of the positive integer n.

Given a positive integer n, find the total number of different partitions of n.

Input Format

One line containing an integer n.

Output Format

One line containing an integer representing the total number of partitions.

Since the answer may be very large, output the result modulo 109 + 7.

Constraints

1 ≤ n ≤ 1000

Sample Input

5

Sample Output

7

Comments

There are no comments at the moment.