cho.sh
Notes
Loading...

Custom Dice

Time limit

2s

Memory limit

128 MB

Problem

Jinyoung runs a casino. After losing almost all of his money to a famous blackjack expert, he decides to create a new die and try to win the money back with another game.

The die has six faces. Each face contains a positive integer, and all six integers are different. The average of the six integers written on the die must not exceed M.

Count how many different dice Jinyoung can make.

Two dice are considered the same if one can be rotated to look exactly like the other. Because the answer can be very large, print it modulo 1,000,000,007.

Input

The first line contains the integer M.

M is a positive integer with 1 <= M <= 1,000,000.

Output

Print the answer modulo 1,000,000,007.

Hint

The smallest possible die uses the numbers (1, 2, 3, 4, 5, 6), whose average is 3.5. Therefore no die has average at most 3.