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 dollars. So he is wondering what would be the expected value of the reminder from dividing by if he chose and randomly and independently from 1 to . And he is also confused about the number . So now he wants to know the sum of such expected values for all from 1 to .
Well now he is too angry to do the math, so he hired you.
The input contains only one integer — ()
Print one number expressing the sum of the expected values in following format — If the answer is , then print the number , where denotes the multiplicative inverse of modulo .
Input | Output |
---|---|
1 | 0 |
Input | Output |
---|---|
2 | 250000002 |
Input | Output |
---|---|
10 | 94129043 |