Rooks on a chessboard#1327

Rooks on a chessboard

1 second
128 megabytes
Medium

Since childhood, little Garik was curious about one question: in how many ways can rooks be placed on a chessboard of size n \times n so that they do not attack each other? He spent a long time solving this puzzle for each case; and when he finally solved it, he gave up chess.

How quickly can you solve this problem?

Input

The size of the chessboard (n \le 1000).

Output

Print the answer found by Garik.

Examples

Example 1

Loading
Loading