Code Submission Evaluation System | Login |

**Task** | Statistics

Time limit: | 1.00 s | Memory limit: | 512 MB |

A permutation of integers $1,2,\ldots,n$ is called

Given $n$, your task is to count the number of beautiful permutations.

The only input line contains an integer $n$.

Print the number of beautiful permutations of $1,2,\ldots,n$ modulo $10^9+7$.

- $1 \le n \le 1000$

Input:

`5`

Output:

`14`