2 shunfurh shunfurh 于 2017.04.20 21:02 提问

Goldbach

Fancy is learning mathematics recently. He's already mastered the use of multiplication and addition days before, so today he's going to learn prime number.

After reading the learning material, he's been asked to complete a simple test. He's been given an integer X larger than 1, using multiplication, addition and at most 3 prime numbers, how many ways could he get the answer as X exactly?

Since that Fancy is a new learner of mathematics, he's still not familiar with brackets. So in the calculation, the addition is always performed after multiplication.

Input

There will be multiple test cases. Each test case contains a single integer X (1 < X ≤ 80000) in one line.

Output

For each test case, please calculate the number of ways which Fancy could get the answer as X. Since that the number of ways might be large, please output it modulo 1000000007.

Sample Input

5
10
8
Sample Output

2
4
4

1个回答

caozhy
caozhy   Ds   Rxr 2017.05.05 12:17
已采纳
Csdn user default icon
上传中...
上传图片
插入图片