Peaceful Queens - 2#4449

Peaceful Queens - 2

1 second
64 megabytes
Medium

Given a natural number , determine how many distinct ways there are to place queens on an n \times n chessboard such that no two queens threaten each other. Arrangements that are identical when the board is rotated or reflected are considered the same.

Input

The input consists of a single natural number , where does not exceed .

Output

Output a single integer: the number of unique arrangements of non-attacking queens on the n \times n chessboard.

Examples

Example 1

Loading
Loading