LearnPy Hub
← Arena
IntermediateRating 1400

Nobody Gets Their Own Gift

n friends swap gifts so nobody receives their own. Print the number of ways mod 1 000 000 007.

Input

One integer n (1 ≤ n ≤ 10⁵).

Output

A count.

Sample 1

Input
3
Output
2

Sample 2

Input
1
Output
0
solution.py
Output appears here
Nobody Gets Their Own Gift · Python Arena problem · LearnPy Hub