Lorenzo devised an innovative yet incorrect algorithm to count the number of inversions\footnote{An inversion for an array is a pair such that and .} for any given permutation of elements.
Full of optimism, he computed this number for a permutation simply as the sum
Task
Unfortunately his formula has some flaws and the algorithm fails to consistently produce the correct output. Lorenzo is now wondering how often his algorithm yields the wrong answer: help him by counting the number of permutations for which his algorithm fails in computing the number of inversions!
Since the answer might be quite large, you are asked to print it modulo .
Input data
The input file consists of a line containing integer .
Output data
The output file must contain a single line consisting of integer .
Constraints and clarifications
| # | Score | Constraints |
|---|---|---|
| 1 | 0 | Examples |
| 2 | 12 | |
| 3 | 28 | |
| 4 | 30 | |
| 5 | 30 | No additional restrictions |
Example 1
stdin
3
stdout
1
Explanation
In the first sample case, Lorenzo's algorithm computes an incorrect value only for the permutation .
Example 2
stdin
4
stdout
10