#CTR0017. Easy

Easy

Description

Given a positive integer n n , consider an n×n n \times n matrix a a where the element in the i i -th row and j j -th column is given by ai,j=(i1)×n+j a_{i,j} = (i-1) \times n + j . Below is an example for n=4 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:

  • Exactly two numbers are chosen from each row.

  • Exactly two numbers are chosen from each column.

You need to determine the minimum sum of the numbers that are selected.

Input Format

The first line contains a positive integer n n , representing the size of the matrix.

2n1032 \leq n \leq 10^3

Output Format

A single integer, representing the minimum sum of the numbers that are selected.

Sample Input #1

2

Sample Output #1

10

Sample Input #2

4

Sample Output #2

68