# Task
 Below we will define what and n-interesting polygon is and your task is to find its area 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. You can see the 1-, 2- and 3-interesting polygons in the picture below.

 ![](https://files.gitter.im/myjinxin2015/Gwsw/blob)

# Example

 For `n = 1`, the output should be `1`;
 
 For `n = 2`, the output should be `5`;
 
 For `n = 3`, the output should be `13`.

# Input/Output


 - `[input]` integer `n`

    Constraints: `1 ≤ n < 10000.`
    

 - `[output]` an integer

   The area of the n-interesting polygon.

Source: codewars | Difficulty: EASY
Tags: Ad-hoc

Starter code: def shape_area(n):
	

Solutions:
def shape_area(n):
	return n ** 2 + (n - 1) ** 2


def shape_area(n):
	p = 0
	area = 1
	for i in range(1, n):
		p = n * 4 - 4
		n -= 1
		area += p
	return area


tr = lambda n: n * (n + 1) // 2 if n >= 0 else 0
shape_area = lambda n: tr(n) + 2 * tr(n - 1) + tr(n - 2)


def shape_area(n):
	return sum([4 * (e - 1) for e in range(n, 1, -1)]) + 1


def shape_area(n):
	res = 1
	for x in range(1, n):
		res += x * 4
	return res


def shape_area(n):
	return 2 * sum((x for x in range(1, 2 * (n - 1), 2))) + (2 * n - 1)