Observant Vasya#4539

Observant Vasya

1 second
64 megabytes
Very easy

In a renowned tank strategy competition, Vasya noticed that an important factor is how many opponents simultaneously choose a player's tank as their target. Vasya became curious about the total number of different battles that are possible among tanks. Since this calculation turned out to be too challenging for Vasya, he asks for your help: given the number of tanks, determine how many distinct battles can occur between them.

In this context, a battle is defined as each of the tanks independently choosing exactly one of the other tanks as its target. Every tank is considered an opponent for all other tanks (except itself). The choice of targets is independent of any circumstances such as the distance between tanks, the turret's rotation angle, and so on.

Below is an example of a battle configuration for n = 4:

[1]<====>[4]
^
|
|
|
[2]<-----[3]

In this example, tank targets tank , tank targets tank , tank targets tank , and tank targets tank .

Input

A natural number (1 \leq n \leq 16), the number of tanks.

Output

A natural number: the answer to the problem.

Examples

Example 1

Loading
Loading