Given a positive integer $$$n$$$, consider an $$$n \times n$$$ matrix $$$a$$$ where the element in the $$$i$$$-th row and $$$j$$$-th column is given by $$$a_{i, j} = (i - 1) \times n + j$$$. Below is an example for $$$n = 4$$$:
$$$$$$ \begin{bmatrix} 1 & 2 & 3 & 4 \\ 5 & 6 & 7 & 8 \\ 9 & 10 & 11 & 12 \\ 13 & 14 & 15 & 16 \end{bmatrix} $$$$$$
Your task is to select some numbers from the matrix such that:
You need to determine the minimum sum of the numbers that are selected.
The first line contains a positive integer $$$n$$$, representing the size of the matrix.
$$$2 \le n \le 10^3$$$
A single integer, representing the minimum sum of the numbers that are selected.
2
10
4
68
| Name |
|---|


