- Prepare
- Security
- Terminology and Concepts
- Security Encryption Scheme

# Security Encryption Scheme

# Security Encryption Scheme

An *encryption scheme* consists of a set and a corresponding set of encrypting and decrypting functions, respectively.

For each , there is a unique key where .

An encryption scheme is also called a *cipher*.

It should be clear that every is actually a representative of some bijection from to . In this task, you have to count the number of such bijections and, hence, the number of keys that produce different encryption functions.

Assume that which is given as the input.

**Constraints**

**Input Format**

The input consists of a single positive integer .

**Output Format**

Output a single positive integer, the number of bijections.

**Sample Input**

```
3
```

**Sample Output**

```
6
```

**Explanation**

Let us assume that and .

We can have encryption schemes where can be mapped to or or , can be mapped to the remaining two, and can be mapped to the unmapped one.

This accounts for such encryption functions.