Limits 2s, 512 MB

Do you know Trevor Philips? Well he is a mad guy who gets mad at everything. Recently he got mad at reminders because some shopkeeper kept them as changes.

Today Trevor chooses to spend no more than NN dollars. So he is wondering what would be the expected value of the reminder from dividing xx by yy if he chose xx and yy randomly and independently from 1 to NN. And he is also confused about the number NN. So now he wants to know the sum of such expected values for all NN from 1 to MM.

Well now he is too angry to do the math, so he hired you.

Input

The input contains only one integer — MM (1M1061 ≤ M ≤ 10^6)

Output

Print one number expressing the sum of the expected values in following format — If the answer is PQ\frac{P}{Q}, then print the number P×Q1 modulo 109+7P \times Q^{−1} \space \text{modulo} \space 10^9+7, where Q1Q^{-1} denotes the multiplicative inverse of QQ modulo 109+710^9+7.

Samples

InputOutput
1
0
InputOutput
2
250000002
InputOutput
10
94129043

Submit

Login to submit.

Statistics

73% Solution Ratio
tmwilliamlin168Earliest, Feb '20
nusuBotFastest, 0.1s
sajib_readdLightest, 8.1 MB
Kuddus.6068Shortest, 787B
Toph uses cookies. By continuing you agree to our Cookie Policy.