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.
The input consists of a single natural number , where does not exceed .
Output a single integer: the number of unique arrangements of non-attacking queens on the n \times n chessboard.
Example 1