We will define an n
-interesting polygon.
Your task is to find the area of a polygon for a given n
.
A 1
-interesting polygon is just a square with a side of length 1
.
An n
-interesting polygon is obtained by taking the n - 1
-interesting polygon and appending 1
-interesting polygons to its rim, side by side.
- For
n = 2
, the output should beshapeArea(n) = 5
. - For
n = 3
, the output should beshapeArea(n) = 13
.
-
[execution time limit] 5 seconds (ts)
-
[input] integer
n
- Guaranteed constraints:
$1 \le n \le 10^{4}$
- Guaranteed constraints:
-
[output] integer
- The area of the
n
-interesting polygon.
- The area of the