St Andrews Online Judge

Montmort Number

By Kay Akashi

Time: 1000 ms
Memory: 256000 kB

Loading account information...

Loading account information...

Problem Statement

The number of possible permutations which satisfy the following condition is called the Montmort number:

The possible number of P=(p1,p2,...,pN)P = (p_1, p_2, ..., p_N) ( PP is a permutation of (1,2,...,N)(1, 2, ..., N) ) such that ipii \neq p_i for i(1,2,3,,N)∀i ∈ (1,2,3,…,N).

The Montmort number for the array of length NN is given as:

aN=N!k=2N(1)kk!a_N = N! \sum_{k=2}^{N} \frac{(-1)^k}{k!}

Given the integer NN, output aNa_N, the Montmort number of array of length NN.

Constraints

2N152 \leq N \leq 15

Input

The input consists of a single integer, NN.

Output

Output the Montmort number for NN.

Examples

Input

3

Output

2

Input

4

Output

9