According to Wikipedia, Albrecht Dürer (May 21, 1471 - April 6, 1528) was a German painter, printmaker, and theorist of the German Renaissance. His famous engraving “Melencolia I”, as shown in the figure above, contains references to carpentry, alchemy, geometry, numerology, and many other disciplines. It has been the subject of more scholarship than probably any other print. In the engraving, a square with an interesting property can be seen. The square is shown below:
The sum of the values in each row and each column is equal to 34. Even the sums of the values in the main diagonal and the anti-diagonal are 34. This type of square is also known as Magic Square.
In this problem, your task is to find out the number of ways to fill a grid to make Magic Squares. Two Magic Squares are considered different if they differ by at least one cell. To keep the problem simple, you will be given an integer . You need to construct the Magic Square using integers in the range . You can use any integer as many times as you want.
The input will contain a single integer, denoting the range.
Print one integer denoting the possible number of different Magic Squares.