While playing with geometric figures Alex has accidentally invented a concept of a $n$-th order rhombus in a cell grid.

A $1$-st order rhombus is just a square $1 \times 1$ (i.e just a cell).

A $n$-th order rhombus for all $n \geq 2$ one obtains from a $n-1$-th order rhombus adding all cells which have a common side with it to it (look at the picture to understand it better).

 [Image] 

Alex asks you to compute the number of cells in a $n$-th order rhombus.


-----Input-----

The first and only input line contains integer $n$ ($1 \leq n \leq 100$) — order of a rhombus whose numbers of cells should be computed.


-----Output-----

Print exactly one integer — the number of cells in a $n$-th order rhombus.


-----Examples-----
Input
1

Output
1
Input
2

Output
5
Input
3

Output
13


-----Note-----

Images of rhombus corresponding to the examples are given in the statement.

Difficulty: EASY
Tags: Mathematics

Dynamic programming

Implementation
Skill types: Dynamic programming
Expected Time Complexity: O(1)

Starter code:

Solutions:
n = int(input())
c = 1
m = 0
if n == 1:
	print(1)
elif n == 2:
	print(5)
else:
	c = c + (n - 1) * 4
	n = n - 2
	c = c + 4 * n * (n + 1) // 2
	print(c)


n = int(input())
x = 2 * n ** 2 - 2 * n + 1
print(x)


a_list = [a for a in range(1, 200) if a % 2]
n = int(input()) - 1
print(sum(a_list[:n]) * 2 + a_list[n])


n = int(input())
cnt = 1
for i in range(n):
	cnt += 4 * i
print(cnt)


k = int(input())
c = 0
if k == 1:
	print(1)
else:
	while k > 1:
		c += 4 + 4 * (k - 2)
		k -= 1
	print(c + 1)


def main():
	c = 1
	for i in range(int(input())):
		c += 4 * i
	return c
print(main())


a = int(input())
q = 1
for i in range(a):
	q += i * 4
print(q)


list1 = [i * i for i in range(1, 101)]
n = int(input())
if n > 1:
	print(list1[n - 1] + list1[n - 2])
elif n == 1:
	print(1)


n = int(input())
s = 1
m = 1
for i in range(n):
	s = s + 4 * i
print(s)


n = int(input())
if n == 1:
	print(1)
else:
	x = 1
	for i in range(n - 1):
		x = x + 4 * (i + 1)
	print(x)


k = int(input())
s = k * k + (k - 1) * (k - 1)
print(s)


n = int(input())
s = 1
if n > 1:
	s = 2 * (n - 1) ** 2 + 2 * n - 1
print(s)


n = int(input())
res = 1
for i in range(2, n + 1):
	res += i * 2 + (i - 2) * 2
print(res)


n = int(input())
a = [1]
x = 4
for i in range(n - 1):
	a.append(a[i] + x)
	x = 4 * (i + 2)
print(a[n - 1])


from sys import stdin as _stdin
from sys import stdout
import math
stdin = lambda type_='int', sep=' ': list(map(eval(type_), _stdin.readline().split(sep)))
joint = lambda sep=' ', *args: sep.join((str(i) if type(i) != list else sep.join(map(str, i)) for i in args))

def iters():
	return xrange(int(raw_input()))

def solve(n):
	ans = 0
	n = n[0]
	middle = 1 + 2 * (n - 1)
	one_side = (1 + middle - 2) * math.floor(middle / 4)
	if n % 2 == 0:
		ans += middle - 2 + 1
	return ans + one_side * 2 + middle
n = stdin()
print(solve(n))


import math

def s():
	n = int(input())
	ans = 1
	if n == 1:
		return ans
	else:
		ans = 1
		for i in range(2, n + 1):
			ans += i * 4 - 4
		return ans
ans = s()
print(ans)


n = int(input())
ans = 1
i = 1
while i < n:
	ans += i * 4
	i += 1
print(ans)


n = int(input())
if n == 1:
	print(1)
else:
	print((n - 1) ** 2 + n ** 2)


x = int(input())
r = 1
for i in range(x):
	r = r + 4 * i
print(r)


n = int(input())

def sq(n):
	if n == 1:
		return 1
	else:
		return 4 * (n - 1) + sq(n - 1)
print(sq(n))


n = int(input())
box = lambda x: box(x - 1) + x * 4 - 4 if x > 1 else 1
print(box(n))


(n, ans) = (int(input()), 1)
for i in range(1, n):
	ans = ans + 4 * i
print(ans)


n = int(input())
a = [0 for i in range(101)]
a[0] = 1
c = -1
for i in range(1, 101):
	a[i] = 4 * (1 + (c + 1)) + a[i - 1]
	c += 1
print(a[n - 1])


n = int(input())
ans = 0
for i in range(1, n * 2 - 1, 2):
	ans += i * 2
ans += n * 2 - 1
print(ans)


import sys
input = sys.stdin.readline

def ii():
	return int(input())

def mi():
	return map(int, input().rstrip().split())

def lmi():
	return list(map(int, input().rstrip().split()))

def li():
	return list(input().rstrip())
n = ii()
print(pow(2 * n - 1, 2) - n * (n - 1) * 2)


n = int(input())
a = 2 * n * n - 2 * n + 1
print(a)


n = int(input())
count = 0
for i in range(1, n + 1, 1):
	if i != n:
		count += (2 * i - 1) * 2
	else:
		count += 2 * i - 1
print(count)


n = int(input())
res = n ** 2 + (n - 1) ** 2
print(res)


n = int(input())
cell_list = [-1 for i in range(104)]

def cell_num(n):
	cell_list[1] = 1
	cell_list[2] = 5
	if cell_list[n] != -1:
		return cell_list[n]
	cell_list[n] = cell_num(n - 1) + 4 * (n - 1)
	return cell_list[n]
print(cell_num(n))


n = int(input())
c = 1 + (n - 1) * 2
d = 0
for i in range(1, c, 2):
	d = d + i
print(c + d + d)


a = int(input())
ans = 1
k = 4
for i in range(a - 1):
	ans += k
	k += 4
if a == 0:
	print(0)
else:
	print(ans)


k = int(input())
print((k - 1) * (4 + (k - 1 - 1) * 2) + 1)


def main():
	data = [0] * 100
	(data[0], data[1]) = (1, 5)
	for i in range(2, 100):
		data[i] = data[i - 1] + 4 + 4 * (i - 1)
	print(data[int(input()) - 1])

def add():
	data = [1, 5, 13, 25, 41, 61, 85, 113, 145, 181, 221, 265, 313, 365, 421, 481, 545, 613, 685, 761, 841, 925, 1013, 1105, 1201, 1301, 1405, 1513, 1625, 1741, 1861, 1985, 2113, 2245, 2381, 2521, 2665, 2813, 2965, 3121, 3281, 3445, 3613, 3785, 3961, 4141, 4325, 4513, 4705, 4901, 5101, 5305, 5513, 5725, 5941, 6161, 6385, 6613, 6845, 7081, 7321, 7565, 7813, 8065, 8321, 8581, 8845, 9113, 9385, 9661, 9941, 10225, 10513, 10805, 11101, 11401, 11705, 12013, 12325, 12641, 12961, 13285, 13613, 13945, 14281, 14621, 14965, 15313, 15665, 16021, 16381, 16745, 17113, 17485, 17861, 18241, 18625, 19013, 19405, 19801]
	n = int(input())
	print(data[n - 1])
main()


n = input()
sum = 0
for i in range(1, int(n) + 1):
	sum += i * 2 - 1
for i in range(int(n) - 1, 0, -1):
	sum += i * 2 - 1
print(sum)


t = int(input())
n = t - 1
ans = 1 + n * (4 + 4 * n) // 2
print(ans)


n = int(input())
c = 2 * n - 1
for i in range(1, n):
	c = c + 2 * (2 * i - 1)
print(c)


a = int(input())
k = 1
for i in range(1, a):
	k += i * 4
print(k)


n = int(input())
if n == 1:
	print(1)
else:
	ans = 2 * n - 1
	while n >= 2:
		ans += 4 * n - 6
		n -= 1
	print(ans)


N = int(input())
print(N * N + (N - 1) * (N - 1))


a = []
sum = 0
for i in range(1, 101):
	if i == 1:
		sum = 1
		a.append(sum)
	else:
		sum += 4 * (i - 1)
		a.append(sum)
n = int(input())
print(a[n - 1])


import math as mt
import sys, string, bisect
input = sys.stdin.readline
import random
from collections import deque, defaultdict
L = lambda : list(map(int, input().split()))
Ls = lambda : list(input().split())
M = lambda : map(int, input().split())
I = lambda : int(input())
d = defaultdict(int)
n = I()
print(n ** 2 + (n - 1) ** 2)


s = int(input())
smal = 1
n = s - 1
ver_in = n * 4
if s < 3:
	print(smal + ver_in)
else:
	diag = 0
	for x in range(1, s - 2 + 1):
		diag += x
	print(smal + ver_in + diag * 4)


n = int(input())
print(abs(2 * n * n - 2 * n + 1))


n = int(input())
ans = (n - 0.5) ** 2 * 2 + 0.5
print(int(ans))


n = int(input())
form = n * 2 * (n - 1) + 1
print(form)


k = [0 for i in range(100)]
k[0] = 1
k[1] = 4
for i in range(2, 100):
	k[i] = k[i - 1] + 4
S = [0 for i in range(100)]
S[0] = k[0]
for i in range(1, 100):
	S[i] = S[i - 1] + k[i]

def main():
	n = int(input())
	print(S[n - 1])
main()


a = int(input())

def c(n):
	if n == 1:
		return 1
	else:
		return 4 * (n - 1) + c(n - 1)
print(c(a))


import math

def solve(n):
	if n == 1:
		print('1')
	else:
		t = int(math.pow(n - 1, 2) + math.pow(n, 2))
		print(str(t))
n = int(input())
solve(n)


n = int(input())
res = [1]
for i in range(1, n):
	res.append(res[i - 1] + 4 * i)
print(res[n - 1])


n = int(input())
a = [1, 5]
space = [4, 8]
l = 2
while l < n:
	a.append(a[-1] + space[-1])
	space.append(space[-1] + 4)
	l += 1
print(a[n - 1])


Sum = 1
L = 0
for _ in range(int(input())):
	Sum += L
	L += 4
print(Sum)


n = int(input())
if n >= 2:
	edges = 2 * n * n - 2 * n + 1
	print(edges)
if n == 1:
	print(1)


ans = [1]
for i in range(101):
	ans.append(ans[i] + 4 * i)
print(ans[int(input())])


i = int(input())
re = 1
for x in range(2, i + 1):
	re += x * 2 + (x - 2) * 2
print(re)


n = int(input())
res = n * 2 - 1
if n == 2:
	print(5)
else:
	res += (n - 1) ** 2 * 2
	print(res)


n = int(input())
l = n + n - 1
s = 0
for i in range(1, l, 2):
	s += i
s = 2 * s
print(s + l)


n = int(input())
prev = 1
for i in range(2, n + 1):
	prev += 4 * (i - 1)
print(prev)


import sys
x = int(input())
sol = 0
for i in range(1, 2 * x, 2):
	sol += 2 * i
sol -= 2 * x - 1
print(sol)


n = int(input())

def f(x):
	if x == 1:
		return 1
	return x * 4 - 4 + f(x - 1)
print(f(n))


n = int(input())
total = 1
if n == 1:
	print(1)
	exit(0)
else:
	i = 1
	while i < n:
		total += i * 4
		i += 1
print(total)


n = int(input())
a = [[0] * 100 for _ in range(100)]
dir = [[-1, 0], [1, 0], [0, 1], [0, -1]]
for s in range(0, n):
	i = 0
	j = s
	while j >= 0:
		a[i][j] = 1
		j -= 1
		i += 1
r = 0
for i in range(1, 100):
	r += a[0][i]
d = 0
for i in range(1, 100):
	for j in range(1, 100):
		d += a[i][j]
sum = d * 4 + r * 4 + 1
print(sum)


def ain():
	return map(int, input().split())
n = int(input())
k = 2 * n - 1
print(k + ((k - 1) // 2) ** 2 * 2)


n = int(input())
sol = 1 + 2 * (n - 1) * n
print(sol)


n = int(input())
inc = 4
cur = 0
out = 1
for i in range(1, n):
	cur += inc
	out += cur
print(out)


import math
arr = [i * 2 - 1 for i in range(1, 101)]
n = int(input())
print(sum(arr[:n]) + sum(arr[:n - 1]))


def n_rhombus(n):
	return (n - 1) ** 2 + n ** 2
n = int(input())
print(n_rhombus(n))


def fn(n):
	if n == 1:
		return 1
	elif n == 2:
		return 5
	else:
		return fn(n - 1) + 4 + 4 * (n - 2)
print(fn(int(input())))


n = int(input())
result = 1
if n > 1:
	result = 2 * n ** 2 - 2 * n + 1
print(result)


n = int(input())
if n == 1:
	print(1)
else:
	total = 0
	for i in range(1, n + 1):
		total += 4 * (i - 1)
	print(total + 1)


n = int(input())
dp = [1] * n
for i in range(1, n):
	dp[i] = dp[i - 1] + 4 * i
print(dp[-1])


n = int(input())
a = [0] * 105
a[1] = 1
for i in range(2, 105):
	a[i] = a[i - 1] + 4 * (i - 1)
print(a[n])


def answer():
	a = int(input())
	scaled = a * (a + 1) - 1
	flappy = (a - 2) * (a - 1)
	ans = flappy + scaled
	return ans
print(answer())


import sys
inf = float('inf')
mod = 1000000007

def get_array():
	return list(map(int, sys.stdin.readline().split()))

def get_ints():
	return map(int, sys.stdin.readline().split())

def input():
	return sys.stdin.readline()

def int1():
	return int(input())
import string
import math
from itertools import combinations

def main():
	n = int1()
	if n == 1:
		print(1)
	else:
		x = n - 1
		print(n * n + (n - 1) * (n - 1))
main()


N = int(input())
s = 1
for i in range(2, N + 1):
	s += 4 * (i - 1)
print(s)


n = int(input())
tab = [0] * (n + 1)
tab[1] = 1
for i in range(2, n + 1):
	tab[i] = tab[i - 1] + (i - 1) * 4
print(tab[-1])


a = int(input())
b = a
cnt = 0
while a != 1:
	cnt += 2
	a -= 1
print(b * cnt + 1)


n = int(input()) + 1
d = [1] * n
for i in range(1, n):
	d[i] = d[i - 1] + (i - 1) * 4
print(d[-1])


n = int(input())
i = 1
s = 1
t = 0
while i < n:
	t = t + 4
	s = s + t
	i = i + 1
print(s)


l = [1, 5]
for i in range(2, 101):
	cell = 2 * l[i - 1] - l[i - 2] + 4
	l.append(cell)
n = int(input())
print(l[n - 1])


n = int(input())
s = 1
s = s + ((n - 1) * 4 + 4) / 2 * (n - 1)
print(int(s))


n = int(input())
y = 0
x = 1
for i in range(1, n + 1):
	y = x + (i - 1) * 4
	x = y
print(y)


TestCase = int(input())
if TestCase == 1:
	print(1)
else:
	print(TestCase ** 2 * 2 - (TestCase * 2 - 1))


n = int(input())
total = 0
a0 = 1
ai = 1
for i in range(1, n):
	ai = ai + 4 * i
print(ai)


a = int(input())
n = a
num = n * (n - 1) / 2
ans = 1 + 4 * num
print(int(ans))


n = int(input().strip())
print(n ** 2 + (n - 1) ** 2)


n = int(input())
last = 1
for i in range(1, n + 1):
	out = (i - 1) * 4 + last
	last = out
print(out)


from sys import stdin, stdout
n = int(stdin.readline())
ans = 0
for i in range(1, n + 1):
	ans += 2 * (2 * i - 1)
ans = ans - (2 * i - 1)
print(ans)


import sys
import collections
import math
import functools
import itertools
import bisect
import operator
import heapq
import random
true = True
false = False
null = None
tcid = 0
tcmax = 99999999

def compute(val, func):
	return func(val)

def seq(lo, hi, step=1):
	return range(lo, hi + 1, step)

def sround(val, nd):
	return f'{val:.{nd}f}'

def ceil(a, b):
	ans = a // b
	if a % b != 0:
		ans += 1
	return ans

def perr(*args, **kwargs):
	print(*args, file=sys.stderr, **kwargs)

def line():
	ln = sys.stdin.readline().strip()
	if ln == '':
		sys.exit()
	return ln

def lines(n):
	return [line() for i in range(n)]

def split(ln=None):
	return (ln or line()).split()

def num(str=None):
	str = str or line()
	return float(str) if '.' in str else int(str)

def nums(o=None):
	if o is not None:
		if isinstance(o, int):
			o = lines(o)
		elif isinstance(o, str):
			o = split(o)
	return list(map(num, o or split()))

def mainloop(tcid=1):
	n = num()
	ans = 1
	for xx in range(1, n):
		ans += xx * 4
	print(ans)
while tcid < tcmax:
	tcid += 1
	mainloop(tcid)


ans = 1
n = int(input())
if n == 1:
	print(ans)
else:
	for i in range(2, n + 1):
		ans += 4 * (i - 1)
	print(ans)


from array import *
n = int(input())
dp = array('i', [])
dp.append(1)
x = 1
y = 1
val = 1
while val < n:
	y += 4 * x
	dp.append(y)
	x += 1
	val += 1
print(dp[n - 1])


def sum(n):
	return n * (n + 1) // 2
n = int(input())
print(sum(n) + sum(n - 1) + sum(n - 1) + sum(n - 2))


import math
n = int(input())
while n < 1 or n > 100:
	n = int(input())

def calc(m):
	return m * m * 2 - 2 * m + 1
print(calc(n))


n = int(input())
f = 2 * n - 1
d = f
sum = 0
while f > 0:
	sum = sum + f
	f = f - 2
print(2 * sum - d)


n = int(input())
c = n * (n - 1) // 2
print(c * 4 + 1)


n = int(input())
k = 1
s = 1
if n == 1:
	print(1)
else:
	print(n ** 2 + (n - 1) ** 2)


n = int(input())
a = []
a.append(1)
for i in range(1, 101):
	a.append(a[i - 1] + 4 * i)
print(a[n - 1])


n = int(input())
val = 1
for i in range(1, n):
	val = val + 4 * i
print(val)


n = int(input())
cells = 0
prev = 2 * n - 1
r0und = 0
while r0und <= n - 1:
	cells += prev
	prev -= 2
	r0und += 1
cells = cells * 2 - (2 * n - 1)
print(cells)


n = int(input())
ans = pow((n - 1) * 2 + 1, 2) - n * (n - 1) // 2 * 4
print(ans)


a = [1]
for i in range(1, 100):
	a.append(a[-1] + 4 * i)
x = int(input())
print(a[x - 1])


import sys
from collections import Counter

def input():
	return sys.stdin.readline().strip()

def dinput():
	return int(input())

def tinput():
	return input().split()

def rinput():
	return map(int, tinput())

def rt(e, t):
	return (e + 1) * (t - e)

def main():
	n = int(input())
	print((n - 1) * n * 2 + 1)
main()


n = int(input())
d = n ** 2 + (n - 1) ** 2
print(d)


lst = []
n = int(input())
lst.append([1, 1])
lst.append([5, 3])
lst.append([13, 5])
if n == 0:
	print(0)
	exit()
if n < 3:
	print(lst[n - 1][0])
	exit()
for i in range(3, n):
	new_w = lst[i - 1][1]
	lst.append([lst[i - 1][0] + 4 + 4 * ((new_w - 1) // 2), new_w + 2])
print(lst[-1][0])


n = int(input())
current = 1
for i in range(2, n + 1):
	current = current + 4 * (i - 1)
print(current)


x = int(input())
print('%d' % (x * (x - 1) / 2 * 4 + 1))


n = int(input())
print(2 * (2 * n - 3) + 3 + 2 * (n - 1) * (n - 2))


n = int(input())
print(int(pow(n, 2)) + int(pow(n - 1, 2)))


n = int(input())
ans = 2 * n * (n - 1) + 1
print(ans)


a = int(input())
ans = 1
for i in range(a):
	ans += 4 * i
print(ans)


orden = int(input())
a = 0
if orden == 1:
	a = 1
elif orden == 2:
	a = 5
else:
	exp = (orden - 1) * (orden - 1)
	a = orden * orden + exp
print(a)


def romb(n):
	count = 1
	if n == 1:
		return count
	for i in range(1, n):
		count += 4 * i
	return count
print(romb(int(input())))


n = int(input())
r = 1
f = 4
for i in range(1, n):
	r += f
	f += 4
print(r)


n = int(input())
count = 1
for x in range(1, n):
	count += 2 * 1
total = count
while count > 1:
	count -= 2
	total = total + 2 * count
print(total)


n = int(input())
result = 1
i = 2
while i <= n:
	result += 4 * (i - 1)
	i += 1
print(result)


import sys
import collections
input = sys.stdin.readline

def printnl(val):
	sys.stdout.write(str(val) + '\n')
n = int(input())
ans = 1
if n == 1:
	print(1)
else:
	for i in range(1, n):
		ans += 4 * i
	print(ans)


def countRhombus(i):
	if i <= 1:
		return 1
	return 4 * (i - 1) + countRhombus(i - 1)
n = int(input())
print(countRhombus(n))


n = int(input())
x = 2 * n - 1
sides = 0
for i in range(1, x + 1, 2):
	sides += i
for i in range(1, x - 1, 2):
	sides += i
print(sides)


n = int(input())
c = 2 * n - 1
k = c
sum = 0
while c > 0:
	sum = sum + c
	c = c - 2
print(sum + sum - k)


n = int(input())
dp = [0 for i in range(n)]
dp[0] = 1
count = 4
for i in range(1, n):
	dp[i] = dp[i - 1] + count
	count += 4
print(dp[n - 1])


n = int(input())
dp = [1]
for i in range(2, n + 1):
	t = dp[i - 2] + 4 + (i - 2) * 4
	dp.append(t)
print(dp[n - 1])


a = int(input())
amo = 0
cur = 1
for i in range(a):
	amo += cur
	if i != a - 1:
		cur += 2
for i in range(a - 1):
	cur -= 2
	amo += cur
print(amo)


def f(n):
	if n == 1:
		return 1
	else:
		return f(n - 1) + 4 + (n - 2) * 4
n = int(input())
print(f(n))


n = int(input())
k = int(n - 1 / 2)
c = 1
lol = 0
if n == 1:
	print(1)
else:
	for i in range(k):
		lol += c
		c += 2
	print(2 * lol + c)


n = int(input())

def romb(n):
	if n == 1:
		return 1
	else:
		return 4 * (n - 1) + romb(n - 1)
print(romb(n))


n = int(input())
a = 1
d = 2
sum = n / 2 * (2 * a + (n - 1) * d)
n = n - 1
sum = sum + n / 2 * (2 * a + (n - 1) * d)
print(int(sum))


p = int(input())
q = (2 * p - 1) ** 2
r = q - q // 2
print(r)


n = int(input())
g = n - 1
print(n * n + g * g)


from sys import stdin, stdout
input = stdin.readline
n = int(input())
print(2 * (n - 1) * (n - 1) + 2 * (n - 1) + 1)


n = int(input())
if n == 1:
	print(1)
else:
	totalSquare = (2 * n - 1) ** 2
	totalSides = (n - 1) * n * 2
	print(totalSquare - totalSides)


n = int(input())
s = 0
s += 2 * n - 1
n -= 1
while n:
	s += 2 * (2 * n - 1)
	n -= 1
print(s)


n = int(input())
top = 2 * (n - 1) + 1
topx = 2 * (n - 1) - 1
if n == 1:
	print(1)
else:
	sum = 0
	for i in range(1, 2 * (n - 1), 2):
		sum += i * 2
	print(sum + top)


n = int(input())
k = 1
shag = 4
for i in range(1, n):
	k += shag
	shag += 4
print(k)


n = int(input())
x = 1
for i in range(n - 1):
	x = 4 * (i + 1) + x
print(x)


n = int(input())
c = 1 + (n - 1) * 2
s = n * (1 + c) / 2
c = 1 + (n - 2) * 2
s = s + (n - 1) * (1 + c) / 2
print(int(s))


n = int(input().strip())
import functools

@functools.lru_cache(maxsize=None)
def rombus(n):
	return 1 if n == 1 else 4 * (n - 1) + rombus(n - 1)
print(rombus(n))


N = int(input())
print((N - 1) ** 2 + N ** 2)


import math
from collections import deque, defaultdict
from sys import stdin, stdout
input = stdin.readline
listin = lambda : list(map(int, input().split()))
mapin = lambda : map(int, input().split())
n = int(input())
ans = 1
k = 4
for i in range(1, n):
	ans += k
	k += 4
print(ans)


def int_lst_input():
	return [int(val) for val in input().split(' ')]

def int_input():
	return int(input())

def print_lst(lst):
	print(' '.join([str(val) for val in lst]))

def solve():
	n = int_input()
	if n == 1:
		print(1)
		return
	current = 1
	for i in range(2, n + 1):
		current += 4 * (i - 1)
	print(current)
solve()


n = int(input())
rombo = 2 * n * (n - 1) + 1
print(rombo)


def number(n):
	if n == 1:
		return 1
	return 2 * n + 2 * (n - 2) + number(n - 1)
n = int(input())
print(number(n))


def main():
	n = int(input())
	ans = n * n + (n - 1) * (n - 1)
	print(ans)

def __starting_point():
	main()
__starting_point()


counter = int(input())
if counter == 1:
	print(counter)
elif counter >= 2:
	print(counter ** 2 + (counter - 1) ** 2)


import sys
input = sys.stdin.readline
RI = lambda : [int(x) for x in sys.stdin.readline().strip().split()]
rw = lambda : input().strip().split()
from collections import defaultdict as df
n = int(input())
ans = n * ((n - 1) * 4) // 2
ans += 1
print(ans)


n = int(input())
if n == 1:
	print(1)
else:
	n -= 1
	summation = (8 + (n - 1) * 4) * n // 2
	print(1 + summation)


z = [1]
a = int(input())
while a > len(z):
	z += [len(z) * 4]
print(sum(z))


a = int(input())
b = a - 1
print(a * a + b * b)


l = []
for i in range(1, 101):
	k = 0
	f = 0
	if i == 1:
		l.append(1)
	else:
		while i > 0:
			if f == 0:
				k += 2 * i - 1
				f = 1
			else:
				k += 2 * (2 * i - 1)
			i -= 1
		l.append(k)
n = int(input())
print(l[n - 1])


N = int(input())
sum = 2 * N - 1
for i in range(1, 2 * N - 2, 2):
	sum += 2 * i
print(sum)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def pe(s):
	return print(str(s), file=sys.stderr)

def JA(a, sep):
	return sep.join(map(str, a))

def JAA(a, s, t):
	return s.join((t.join(map(str, b)) for b in a))

def main():
	n = I()
	return n ** 2 + (n - 1) ** 2
print(main())


t = int(input())
nB = 1
aume = 4
multi = 0
r = 1
if t == 1:
	r = nB
else:
	while t > 0:
		r += aume * multi
		multi += 1
		t -= 1
print(r)


l = [0, 1]
for i in range(1, 100):
	l.append(l[i] + 4 * i)
n = int(input())
print(l[n])


n = int(input())
c = 1
for i in range(1, n):
	c += 4 * i
print(c)


def main():
	n = int(input())
	ans = 0
	count = 1
	n -= 1
	while n != 0:
		ans += count
		count += 2
		n -= 1
	ans *= 2
	ans += count
	print(ans)
main()


a = int(input())
ct = 4
ans = 1
for x in range(a):
	ans += ct * x
print(ans)


t = 0
for i in range(int(input())):
	t = t + 4 * i
print(t + 1)


n = int(input())
a = list()
a.append(0)
a.append(1)
a.append(5)
if n == 1 or n == 2:
	print(a[n])
else:
	an = 1 + 2 * (n - 1)
	s = int((1 + an) * n / 2)
	print(s + s - 2 * n + 1)


n = int(input())
ans = 1
k = 4
for i in range(2, n + 1):
	ans += k
	k += 4
print(ans)


from math import *
from itertools import *
n = int(input())
a = [1] * 106
now = 0
for i in range(1, 106):
	a[i] = a[i - 1] + now
	now += 4
print(a[n])


n = int(input())
number = 2 * n - 1
for i in range(1, 2 * n - 1, 2):
	number += 2 * i
print(number)


n = int(input())
if n == 1:
	print(1)
else:
	(res, j) = (1, 4)
	for i in range(1, n):
		res += j
		j += 4
	print(res)


def rhombus(n):
	return 1 + 2 * (n - 1) + 2 * (n - 1) ** 2
print(rhombus(int(input())))


n = int(input())
k = n ** 2 + (n - 1) ** 2
print(k)


n = int(input())
A = [0, 1]
b = []
if n < 2:
	print(1)
elif n == 2:
	print(5)
else:
	for i in range(2, n + 1):
		A.append(A[i - 1] + i ** 2)
		b.append(A[i] - A[i - 1])
	print(b[-1] + b[-2])


n = int(input())
result = 1
l = 1
for i in range(2, n + 1):
	result += l * 2 + 2
	l += 2
print(result)


from sys import stdin
n = int(stdin.readline())
print(n ** 2 + (n - 1) ** 2)


n = int(input())
print(n * n + (n - 1) * (n - 1))


arr = []
arr.append(0)
temp = 1
arr.append(1)
for i in range(2, 101):
	var = arr[i - 1]
	var = var + 4 * (i - 1)
	arr.append(var)
n = input()
n = int(n)
print(arr[n])


n = int(input())
if n & 1:
	pre = pow(n, 2)
else:
	pre = pow(n - 1, 2)
suf = 0
for i in range(1, n, 2):
	suf += i
print(pre + suf * 4)


n = int(input())
ans = 1
for e in range(n - 1):
	ans = 4 * (e + 1) + ans
print(ans)


def squares(n):
	if n == 1:
		return 1
	return (n - 1) * 4 + squares(n - 1)
n = int(input())
print(squares(n))


n = int(input())
result = 1
for i in range(n):
	result += 4 * i
print(result)


def f(x):
	if x == 1:
		return [1, 0]
	p = f(x - 1)
	k = p[1] + 4
	x = p[0] + k
	return [x, k]
print(f(int(input()))[0])


n = int(input())
q = 1
w = 4
for i in range(n - 1):
	q += w
	w += 4
print(q)


def f(n):
	return int((n + 1) * n / 2)
n = int(input())
print((n * 2 - 1) ** 2 - f(n - 1) * 4)


n = int(input())
if n == 1:
	print(1)
else:
	s = 5
	for i in range(2, n):
		s += i * 4
	print(s)


import math
nth = int(input())
if nth == 1:
	print(1)
else:
	val = int(math.pow(nth, 2) + math.pow(nth - 1, 2))
	print(val)


n = int(input())
sum = 1
for i in range(n):
	sum += 4 * i
print(sum)


n = int(input())
x = 1
y = 1
ans = 0
for i in range(n):
	ans += x
	x += 2
for j in range(n - 1):
	ans += y
	y += 2
print(ans)


n = int(input())
print(sum(list(range(2 * (n - 1) + 2))) - (n - 1))


arr = [1] * 101
for i in range(2, 101):
	arr[i] = arr[i - 1] + (i - 1) * 4
n = int(input())
print(arr[n])


import sys
input = sys.stdin.readline
ins = lambda : input().rstrip()
ini = lambda : int(input().rstrip())
inm = lambda : map(int, input().rstrip().split())
inl = lambda : list(map(int, input().split()))
out = lambda x, s='\n': print(s.join(map(str, x)))
n = ini()
print(n * n + (n - 1) * (n - 1))


N = int(input())
if N == 1:
	print('1', end='')
else:
	L = []
	L.append(0)
	L.append(1)
	for i in range(2, N + 1):
		L.append(L[i - 1] + (i - 1) * 4)
	print(L[N])


x = int(input())

def rhombus(n):
	if n == 1:
		return 1
	if n > 1:
		return 4 * (n - 1) + rhombus(n - 1)
print(rhombus(x))


def find_rhombus(n):
	if n >= 2:
		middle = 2 * n - 1
		terms = middle // 2
		ap_sum = int(terms / 2 * (middle - 2 + 1) * 2)
		return middle + ap_sum
	else:
		return 1
n = int(input())
print(find_rhombus(n))


def recursion(n):
	if n == 1:
		return 1
	if n == 2:
		return 5
	return recursion(n - 1) + 4 * (n - 1)
print(recursion(int(input())))


n = int(input())
if n == 1:
	print(1)
elif n >= 2:
	t = 1
	for i in range(n - 1):
		t = t + 4 * i + 4
	print(t)


n = int(input())
totsides = n * 2 - 1
totcells = totsides ** 2
temp = (n - 1) * n / 2
final = totcells - 4 * temp
print(int(final))


def b():
	arr = int(input())
	print(2 * arr ** 2 - 2 * arr + 1)
b()


import io, os
import math
import heapq
import copy
from collections import OrderedDict
from collections import deque
mod = 1000000007

def powm(a, b):
	res = 1
	a %= mod
	while b:
		if b & 1:
			res = res * a % mod
		a = a * a % mod
		b >>= 1
	return res
t = int(input())
ans = 0
if t == 1:
	print(1)
elif t == 2:
	print(5)
elif t == 3:
	print(13)
else:
	sumo = 0
	if t % 2 == 0:
		j = 1
		for i in range(t):
			if i != t - 1:
				sumo = sumo + 2 * j
			else:
				sumo = sumo + j
			j = j + 2
	else:
		j = 1
		for i in range(t):
			if i != t - 1:
				sumo = sumo + 2 * j
			else:
				sumo = sumo + j
			j = j + 2
	print(sumo)


def run(n):
	F = [None] * (n + 1)
	F[1] = 1
	for i in range(2, n + 1):
		F[i] = F[i - 1] + 4 * (i - 1)
	return F[n]
n = int(input())
res = run(n)
print(res)


def calc(x):
	return x ** 2 + (x - 1) ** 2
n = int(input())
print(calc(n))


def find_max(a, low, mid, high):
	leftsum = -1
	s = 0
	for i in range(mid, low, -1):
		s = s + a[i]
		if s > leftsum:
			leftsum = s
			maxleft = i
	rightsum = -1
	s = 0
	for j in range(mid + 1, high):
		s = s + a[j]
		if s > rightsum:
			rightsum = s
			maxright = j
	return (maxleft, maxright, leftsum + rightsum)

def find(a, low, high):
	if high == low:
		return (low, high, a[low])
	else:
		mid = (low + high) // 2
		(leftlow, lefthigh, leftsum) = find(a, low, mid)
		(rightlow, righthigh, rightsum) = find(a, mid, high)
		(crosslow, crosshigh, crossum) = find_max(a, low, mid, high)
		if leftsum >= rightsum and leftsum >= crossum:
			return (leftlow, lefthigh, leftsum)
		elif rightsum >= leftsum and rightsum >= crossum:
			return (rightlow, righthigh, rightsum)
		else:
			return (crosslow, crosshigh, crossum)
s = int(input())
c = 0
ans = 0
while c != s - 1:
	ans = 1 + c * 2 + ans
	c += 1
ans = 2 * ans + (1 + c * 2)
print(ans)


new = 1
n = int(input())
if n == 1:
	cell = 1
	print(cell)
elif n >= 2:
	for i in range(1, n + 1):
		st = 4 * (i - 1)
		cell = st + new
		new = cell
	print(new)


a = int(input())
print(a * a + (a - 1) * (a - 1))


number = list(map(int, input().split()))
print(2 * (number[0] * number[0] - number[0]) + 1)


def solve():
	n = int(input())
	r = [0] * n
	r[0] = 1
	for i in range(1, n):
		a = (i + 1) * 2
		b = (i - 1) * 2
		r[i] = r[i - 1] + a + b
	print(r[n - 1])
solve()


n = int(input())

def get_cubes(n):
	if n == 1:
		return 1
	else:
		return get_cubes(n - 1) + (n - 1) * 4
print(get_cubes(n))


n = int(input())
sum = 0
y = 2 * n - 1
while y - 2 > 0:
	sum += y - 2
	y -= 2
sum = sum * 2
sum += 2 * n - 1
print(sum)


n = int(input())
l = [1]
for j in range(2, n + 2):
	l.append(l[-1] + 4 + 4 * (j - 2))
print(l[-2])


a = int(input()) - 1
print(1 + a * (a + 1) // 2 * 4)


n = int(input())
val = 1
z = 1
if n == 1:
	print(1)
	exit(0)
for i in range(2, n + 1):
	val += 4 * z
	z += 1
print(val)


N = int(input())
w = N * N
x = N - 1
y = x * x
z = w + y
print(z)


n = int(input())
temp = n * n + (n - 1) * (n - 1)
print(temp)


input = int(input())
sum = 0
fard = 1
akhari = 0
for i in range(1, input + 1):
	sum = sum + fard
	if i == input:
		akhari = fard
	fard = fard + 2
sum *= 2
sum -= akhari
print(sum)


from sys import stdin, stdout
import math, sys, heapq
from itertools import permutations, combinations
from collections import defaultdict, deque, OrderedDict
from os import path
import random
import bisect as bi

def yes():
	print('YES')

def no():
	print('NO')
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

	def I():
		return int(input())

	def In():
		return map(int, input().split())
else:

	def I():
		return int(stdin.readline())

	def In():
		return map(int, stdin.readline().split())

def dict(a):
	d = {}
	for x in a:
		if d.get(x, -1) != -1:
			d[x] += 1
		else:
			d[x] = 1
	return d

def find_gt(a, x):
	i = bi.bisect_left(a, x)
	if i != len(a):
		return i
	else:
		return -1

def main():
	try:
		dp = 1
		n = I()
		ans = 1
		for i in range(1, n):
			ans += dp + 2
			dp += 2
		print(ans * 2 - (n * 2 - 1))
	except:
		pass
M = 998244353
P = 1000000007
for _ in range(1):
	main()


N = int(input().strip())
dp = [0] * (N + 1)
dp[0] = 1
for i in range(1, N + 1):
	dp[i] = dp[i - 1] + (i - 1) * 4
print(dp[N])


def ln(x, y, c):
	return abs(x - c + 1) + abs(y - c + 1)
n = int(input())
ans = 0
for i in range(n + n - 1):
	for j in range(n + n - 1):
		if ln(i, j, n) <= n - 1:
			ans += 1
print(ans)


n = int(input())
dp = [0] * (n + 1)
dp[1] = 1
k = 4
g = 1
for i in range(2, n + 1):
	dp[i] = k * g
	g += 1
print(sum(dp))


def main():
	n = int(input())
	ans = 1
	for i in range(1, n):
		ans += 4 * i
	print(ans)
main()


def cal(n):
	ans = 0
	j = -1
	for i in range(n, 1, -1):
		ans += (i - 1) * 4 + 1
		j += 1
	print(ans - j)
n = int(input())
if n == 1:
	print(1)
else:
	cal(n)


import sys
inf = float('inf')
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
(mod, MOD) = (1000000007, 998244353)
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def input():
	return sys.stdin.readline().strip()
n = int(input())
if n == 1:
	print(1)
else:
	n2 = n - 1
	sum = 0
	for i in range(n2):
		sum += 4 * (i + 1)
	print(sum + 1)


def s(n):
	if n == 0:
		return 1
	else:
		return n * ((n - 1) * 4) // 2 + 1
i = int(input())
print(s(i))


import itertools as it
import functools as ft
import random as rnd
import math as mt
import re
stdin = lambda type_='int', sep=' ': list(map(eval(type_), input().split(sep)))
joint = lambda sep=' ', *args: sep.join((str(i) if type(i) != list else sep.join(map(str, i)) for i in args))

def nextToken():
	while True:
		line = input()
		tokens = re.split('\\s+', line)
		for token in tokens:
			yield token
tok = nextToken()
n = int(next(tok))
s = 1
for i in range(2, n + 1):
	s += 2 * i + 2 * (i - 2)
print(s)


def f(x):
	if x == 1:
		return 1
	else:
		return f(x - 1) + (x - 1) * 4
a = int(input())
print(f(a))


n = int(input())
start = 1
cells = 0
count = 1
while start <= n:
	cells += count
	start += 1
	count += 2
count -= 4
start = n - 1
while start:
	start -= 1
	cells += count
	count -= 2
print(cells)


import math
n = int(input())
sum = 1
for i in range(2, n + 1):
	sum += 4 * (i - 1)
print(sum)


n = int(input())
r = 0
if n == 1:
	r = 1
else:
	a = 2 * (n - 1) * n + 1
	r += a
print(r)


n = int(input())
v = n ** 2 + (n - 1) ** 2
print(v)


n = int(input())
i = 1
r = 1
while n - i >= 1:
	r = r + (n - i) * 4
	i = i + 1
print(r)


n = int(input())
F = [0 for i in range(n)]
F[0] = 1
k = 4
for i in range(1, n):
	F[i] = F[i - 1] + k
	k += 4
print(F[-1])


n = int(input())
ans = 1
curr = 0
for i in range(n - 1):
	curr += 1
	ans += 4 * curr
print(ans)


som = 1
n = int(input())
for i in range(n - 1):
	som = som + 4 * (i + 1)
print(som)


ar = [0 for i in range(0, 101)]

def res():
	ar[0] = 1
	s = 1
	for i in range(1, 101):
		ar[i] = ar[i - 1] + 4 * s
		s += 1
n = int(input())
res()
print(ar[n - 1])


def rombos():
	size = int(input())
	total = 1
	if size == 1:
		print(1)
		return
	for i in range(1, size):
		total += 4 * i
	print(total)
rombos()


def rhom(n):
	if n == 0 or n == 1:
		return n
	return 2 * n * n - 2 * n + 1
n = int(input())
print(rhom(n))


import sys
from collections import Counter
n = int(sys.stdin.readline().strip())
print(1 + 4 * (n * (n - 1) // 2))


def rhombus(nth: int):
	if not 1 <= nth <= 100:
		raise ValueError('input value range is not in 1 ~ 100')
	if nth == 1:
		return 1
	res = (nth - 1) * 4 + rhombus(nth - 1)
	return res
print(rhombus(int(input())))


def rhom(n):
	val = None
	incre = None
	for i in range(1, n + 1):
		if i == 1:
			val = 1
			incre = i * 4
			continue
		val = val + incre
		incre = i * 4
	return val
n = int(input().strip())
print(rhom(n))


n = int(input())
res = 0
for i in range(n + 1):
	res += i
res *= 4
res -= n * 4
res += 1
print(res)


n = input()
h = int(n) - 2
sum = h * (h + 1) / 2
print(int(4 * (int(n) - 1 + sum) + 1))


def dp(n):
	if n == 1:
		return 1
	return 4 * (n - 1) + dp(n - 1)

def main():
	n = int(input())
	print(dp(n))
main()


n = int(input())
i = 1
sum = 1
while i < n:
	sum += 4 * i
	i += 1
print(sum)


z = input
n = int(z())
print(2 * (n - 1) * n + 1)


def run():
	a = eval(input())
	s = 1
	c = 1
	for _ in range(2, a + 1):
		s += 4 * c
		c += 1
	print(s)
run()


N = int(input())
ans = 1
for i in range(N):
	ans += 4 * i
print(ans)


n = int(input())
m = n - 1
a = 1
total = n * (a + (n - 1))
total += m * (a + (m - 1))
print(total)


def rom(n):
	if n == 1:
		return 1
	return (n - 1) * 4 + rom(n - 1)
n = int(input())
print(rom(n))


q = lambda : map(int, input().split())
(n,) = q()
c = 1
for i in range(1, n):
	c += 4 * i
print(c)


arr = [1, 5, 13, 25, 41, 61, 85, 113, 145, 181, 221, 265, 313, 365, 421, 481, 545, 613, 685, 761, 841, 925, 1013, 1105, 1201, 1301, 1405, 1513, 1625, 1741, 1861, 1985, 2113, 2245, 2381, 2521, 2665, 2813, 2965, 3121, 3281, 3445, 3613, 3785, 3961, 4141, 4325, 4513, 4705, 4901, 5101, 5305, 5513, 5725, 5941, 6161, 6385, 6613, 6845, 7081, 7321, 7565, 7813, 8065, 8321, 8581, 8845, 9113, 9385, 9661, 9941, 10225, 10513, 10805, 11101, 11401, 11705, 12013, 12325, 12641, 12961, 13285, 13613, 13945, 14281, 14621, 14965, 15313, 15665, 16021, 16381, 16745, 17113, 17485, 17861, 18241, 18625, 19013, 19405, 19801, 20201, 20605, 21013, 21425, 21841, 22261, 22685, 23113, 23545, 23981, 24421, 24865, 25313, 25765, 26221, 26681, 27145, 27613, 28085, 28561, 29041, 29525, 30013, 30505, 31001, 31501, 32005, 32513, 33025, 33541, 34061, 34585, 35113, 35645, 36181, 36721, 37265, 37813, 38365, 38921, 39481, 40045, 40613, 41185, 41761, 42341, 42925, 43513, 44105, 44701, 45301, 45905]
print(arr[int(input()) - 1])


a = int(input())
d = 0
n = 1
for i in range(a):
	n += d
	d += 4
print(n)


n = int(input())
ans = 1
for i in range(n - 1):
	ans += 2
su = 1
a = 1
for i in range(n - 1):
	su += a + 2
	a += 2
print(2 * su - ans)


n = int(input())
ans = 1
prev = 1
for i in range(2, n + 1):
	ans += (prev + 1) * 2
	ans += (prev - 1) * 2
	prev += 1
print(ans)


n = int(input())
dp = []
dp.append(1)
for i in range(1, 100):
	dp.append(dp[i - 1] + 4 * i)
print(dp[n - 1])


n = int(input())
dp = [0 for i in range(n + 1)]
dp[1] = 1
for i in range(2, n + 1):
	dp[i] = i * i + (i - 1) * (i - 1)
print(dp[n])


n = int(input())
if n == 1:
	print(1)
else:
	n = n - 1
	s = 0
	while n > 0:
		s = s + 4 * n
		n -= 1
	print(s + 1)


def main():
	n = int(input())
	print(2 * n * n - 2 * n + 1)
main()


import os, sys
from io import BytesIO, IOBase
from sys import setrecursionlimit
import heapq
from math import gcd, ceil, sqrt
from collections import Counter, deque
from bisect import bisect_left, bisect_right
setrecursionlimit(100000)
mod = 1000000007

def main():
	n = int(input())
	print(2 * n * n - 2 * n + 1)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


n = int(input())
if n == 1:
	a = 1
a = 1
c = 1
for i in range(2, n + 1):
	a += c * 4
	c += 1
print(a)


n = input()
n = int(n)

def noofcell(n):
	if n == 1:
		return 1
	else:
		return noofcell(n - 1) + 4 * (n - 1)
d = noofcell(n)
print(d)


import sys
import math
get_string = lambda : sys.stdin.readline().strip()
get_list = lambda : list(map(int, sys.stdin.readline().strip().split()))
get_intList_from_str = lambda : list(map(int, list(sys.stdin.readline().strip())))
get_strList_from_str = lambda : list(sys.stdin.readline().strip())
get_int = lambda : int(sys.stdin.readline().strip())
pt = lambda x: sys.stdout.write(str(x))
n = get_int()
l = 2 * n - 1
a = (l - 1) // 2 + 1
squares = a * (l + 1) - l
print(squares)


t = int(input())
print(t ** 2 + (t - 1) ** 2)


n = int(input())
sum = 0
if n == 1:
	print(1)
else:
	sum = sum + 1
	while n != 1:
		sum = sum + (n - 1) * 4
		n = n - 1
	print(sum)


import sys

def inp():
	temp = input()
	return int(temp)

def inlt():
	temp = input()
	return list(map(int, temp.split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())

def solve(x):
	if x == 1:
		return 1
	return 4 * (x - 1) + solve(x - 1)
x = inp()
print(solve(x))


n = int(input())
q = 1
ans = 1
for i in range(2, n + 1):
	ans += q * 2 + 2
	q += 2
print(ans)


n = int(input())
if n == 1:
	summ = 1
elif n % 2 == 1:
	if n == 2:
		summ = 5
	else:
		summ = n * n
		while n >= 3:
			summ += 4 * (n - 2)
			n = n - 2
else:
	summ = (n - 1) * (n - 1)
	while n >= 2:
		summ += 4 * (n - 1)
		n = n - 2
print(summ)


def calc(N):
	if N == 1:
		return 1
	return calc(N - 1) + 4 * (N - 1)
N = int(input())
print(calc(N))


def main():
	c = int(input())
	data = [1, 5]
	for i in range(2, c + 1):
		n = 1 + i * 2
		val = data[i - 1] + (n - 2) * 2 + 2
		data.append(val)
	print(data[c - 1])
main()


n = int(input())
if n == 1:
	print(n)
elif n == 2:
	print(n * 2 + 1)
elif n == 3:
	print(n ** 2 + 4)
else:
	print(n ** 2 + (n - 1) ** 2)


n = int(input())
(result, d) = (1, 4)
while n > 1:
	result += d
	d += 4
	n -= 1
print(result)


n = int(input())
cellcount = n * n + (n - 1) * (n - 1)
print(cellcount)


t = 1
for i in range(int(input()) - 1):
	t += (i + 2) * 2 + i * 2
print(t)


import math
n = int(input())
ans = 1 + 2 * n * (n - 1)
print(ans)


m = int(input())
a = m - 1
p = a * a
print(m * m + p)


n = int(input())
if n == 1:
	print(n)
else:
	sr_lin = 1 + 2 * (n - 1)
	sum_k = k = sr_lin
	while k != 1:
		k -= 2
		sum_k += 2 * k
	print(sum_k)


import sys
n = int(input())
if n == 1:
	print(1)
else:
	print((2 * n - 1) * (2 * n - 1) - 4 * sum(range(1, n)))


n = int(input())
if n == 1:
	print('1')
else:
	t = n - 1
	s = t * (t + 1) // 2
	od = 1 + (n - 1) * 2
	print(od * od - 4 * s)


n = int(input())
ans = 0
temp = 1
for i in range(n - 1):
	ans += temp
	temp += 2
if n != 1:
	ans *= 2
	ans += temp
else:
	ans = 1
print(ans)


n = int(input())
t = 2 * n - 1
t = t - 2
s = 0
u = 2 * n - 1
while t >= 0:
	s = s + t
	t = t - 2
print(2 * s + u)


n = int(input())

def calc(n):
	if n == 1:
		return 1
	else:
		res = calc(n - 1) + 4 * (n - 1)
	return res
k = calc(n)
print(k)


n = int(input())
r = 1
for i in range(2, n + 1):
	r += (i - 1) * 4
print(r)


n = int(input())
s = 2 * n - 1
for i in range(1, n, 1):
	s = s + 2 * (2 * i - 1)
print(s)


def go():
	n = int(input())
	a = 1
	for i in range(1, n):
		a += 4 * i
	return a
	a = 5
print(go())


def fun(num):
	ls = []
	for i in range(num):
		if i == 0:
			ls.append(1)
			continue
		else:
			ls.append(4 * i + ls[i - 1])
	print(ls[-1])
ls = list(map(int, input().split()))
fun(ls[0])


import sys
input = sys.stdin.readline
n = int(input())
print(2 * n ** 2 - 2 * n + 1)


s = int(input())
sum = pow(s, 2) + pow(s - 1, 2)
print(sum)


import math
n = int(input())
dp = [0] * max(2, n + 1)
dp[1] = 1
if n == 1:
	print(dp[n])
else:
	k = 4
	for i in range(2, n + 1):
		dp[i] = dp[i - 1] + k
		k += 4
	print(dp[n])


memo = [0] * 105
s = [0] * 105
n = int(input())
memo[1] = s[1] = 1
for i in range(2, n + 1):
	s[i] = s[i - 1] + i ** 2
	memo[i] = s[i] - s[i - 2]
print(memo[n])


n = int(input())
value = 1
for i in range(2, n + 1):
	temp = (i - 1) * 4
	value = value + temp
print(value)


from sys import stdin, stdout, setrecursionlimit
import heapq
from math import gcd, ceil, sqrt
from collections import Counter, deque
from bisect import bisect_left, bisect_right
ii1 = lambda : int(stdin.readline().strip())
is1 = lambda : stdin.readline().strip()
iia = lambda : list(map(int, stdin.readline().strip().split()))
isa = lambda : stdin.readline().strip().split()
setrecursionlimit(100000)
mod = 1000000007
n = ii1()
print(pow(n, 2) + pow(n - 1, 2))


def cells(n):
	if n == 1:
		return 1
	else:
		return 4 * (n - 1) + cells(n - 1)
s = int(input())
print(cells(s))


def ans(n):
	if n == 1:
		return 1
	else:
		return ans(n - 1) + (n - 1) * 4
n = int(input())
print(ans(n))


def rhombus(n):
	if n == 1:
		return 1
	else:
		return rhombus(n - 1) + 4 * (n - 1)
n = int(input())
print(rhombus(n))


def func(n):
	if n == 1:
		return 1
	else:
		ans = 1
		for i in range(2, n + 1):
			ans += 4 * (i - 1)
		return ans
n = int(input())
print(func(n))


n = int(input())
nl = [n, 3][n > 2]
print([1, 5, n ** 2 + 4 + n * (n - 3) + (n - 3)][nl - 1])


n = int(input())
counter = 0
for i in range(1, n + 1):
	counter += 4 * (i - 1)
print(counter + 1)


i = int(input())
print(2 * i - 1 + 2 * (i - 1) * (i - 1))


n = int(input())
ans = 2 * n - 1
while 2 * n - 3 > 0:
	n -= 1
	ans += 4 * n - 2
print(ans)


n = int(input())
p = 1
c = 1
while True:
	if c == n:
		print(p)
		exit(0)
	p += c * 4
	c += 1


print(sum(range(1, int(input()))) * 4 + 1)


n = int(input())
dp = [-1] * n
dp[0] = 1

def find(num):
	if dp[num - 1] != -1:
		return dp[num - 1]
	return find(num - 1) + (num - 1) * 4
print(find(n))


n = input()
n = int(n)
if n == 1:
	print(1)
else:
	x = (n - 1) * 4
	y = 0
	for i in range(2, n + 1):
		y += 4 * (i - 2)
	print(x + y + 1)


n = int(input())
if n == 1:
	print('1')
else:
	k = 5
	while n > 2:
		k += (n - 1) * 4
		n -= 1
	print(k)


a = int(input())
r = a - 1
e = r * r
count = a * a + e
print(count)


n = int(input())
l = n ** 2 + (n - 1) ** 2
print(l)


f = lambda x: 2 * x * x - 2 * x + 1
print(f(int(input())))


s = int(input())
s -= 1
for a in reversed(range(1, s)):
	s += a
print(s * 4 + 1)


n = int(input())
add = 0
for i in range(n - 1, 0, -1):
	add = add + 4 * i
print(add + 1)


m = int(input())
print(1 + 2 * m * (m - 1))


def func(n: int):
	if n == 1:
		return 1
	else:
		return (n - 1) * 4 + func(n - 1)
n = int(input())
print(func(n))


n = int(input())
if n == 1:
	print(1)
else:
	x = 4
	l = [0] * 101
	l[1] = 1
	for i in range(2, 101):
		l[i] = x * (i - 1) + l[i - 1]
	print(l[n])


def alexAndRhombus(n):
	nF = n * n
	lN = (n - 1) * (n - 1)
	print(nF + lN)
n = int(input())
alexAndRhombus(n)


def rhombus(n):
	s = 0
	h = 1
	if n == 1:
		return 1
	for i in range(n):
		if i != n - 1:
			s = s + 2 * h
		else:
			s = s + h
		h = h + 2
	return s
n = int(input())
print(rhombus(n))


def calc(a):
	r = a ** 2 + (a - 1) ** 2
	print(r)

def main():
	try:
		a = int(input())
		calc(a)
		main()
	except:
		print()
main()


n = int(input())
length = 2 * n - 1
print(length ** 2 // 2 + 1)


a = []
j = 1
a.append(1)
for i in range(101):
	j += 2
	t1 = a[len(a) - 1] + j + (j - 2)
	a.append(t1)
n = int(input())
print(a[n - 1])


dp = dict()
dp[1] = 1

def testCase():
	n = int(input())
	for i in range(2, n + 1):
		dp[i] = dp[i - 1] + (i - 1) * 4
	print('{}'.format(dp[n]))
test = 1
while test:
	testCase()
	test -= 1


import sys
from math import *
from fractions import gcd
readints = lambda : map(int, input().strip('\n').split())
n = int(input())
ans = 1
for i in range(1, n + 1):
	ans += 4 * (i - 1)
print(ans)


def rombo(n):
	if n == 0:
		return 0
	elif n == 1:
		return 1
	else:
		return (n - 1) * 4 + rombo(n - 1)
n = int(input())
print(rombo(n))


n = int(input())
if n == 1:
	print('1')
else:
	start = 1
	for i in range(1, n + 1):
		start += i * 4 - 4
	print(str(start))


def solve(n):
	if n == 1:
		return 1
	if n == 2:
		return 5
	return solve(n - 1) + 4 * (n - 1)

def main():
	n = int(input())
	print(solve(n))
main()


n = int(input())
cnt = 0
start = 1
k = 0
while k < n:
	cnt += 2 * start
	start += 2
	k += 1
cnt -= 2 * n - 1
print(cnt)


n = int(input())
area = 1
for i in range(1, n):
	area += i * 4
print(area)


import sys
IS_LOCAL = False

def readMultiple(f):
	return f(map(int, input().split()))

def main():
	n = 3
	if not IS_LOCAL:
		n = int(input())
	res = n * n + (n - 1) * (n - 1)
	print(res)
if len(sys.argv) > 1 and sys.argv[1] == 'True':
	IS_LOCAL = True
main()


n = int(input())
an = (n - 1) * 2 + 1
count = 0
for i in range(an, 0, -2):
	count += i
print((count - an) * 2 + an)


n = int(input())
a = [0 for i in range(101)]
a[1] = 1
sides = 4
for i in range(2, 101):
	a[i] = a[i - 1] + sides
	sides += 4
print(a[n])


def rhombus(n):
	sum = 1
	prev = 1
	for i in range(n):
		sum = prev + 4 * i
		prev = sum
	return sum
n = int(input())
print(rhombus(n))


n = int(input())
if n == 1:
	print(1)
	exit()
ans = 2 * n - 1
xx = ans - 2
while xx >= 1:
	ans += 2 * xx
	xx -= 2
print(ans)


n = int(input().strip())
dp = [0, 1, 5, 13]
if n <= 3:
	print(dp[n])
else:
	i = 4
	while i <= n:
		dp.append(dp[i - 1] + (i - 1) * 4)
		i += 1
	print(dp[n])


x = int(input())
print(x * x + (x - 1) * (x - 1))


x = int(input())
s = 1
for i in range(x - 1):
	s = s + 4 * i + 4
print(s)


n = int(input())

def oddSum(n):
	sum = 0
	curr = 1
	i = 0
	while i < n:
		sum = sum + curr
		curr = curr + 2
		i = i + 1
	return sum
s = 2 * oddSum(n)
print(s - (n * 2 - 1))


n = int(input())
nCells = 1
counter = 1
i = 2
if n == 1:
	print(1)
elif n >= 2:
	while counter < n:
		nCells += 4 * (i - 1)
		i += 1
		counter += 1
	print(nCells)


n = int(input(''))
l = n - 1
p = 2 * n - 1
s = 0
while 1:
	if s >= l:
		break
	p = p + (2 * s + 1) * 2
	s += 1
print(p)


n = int(input())
h = 1
for i in range(1, n):
	h += (i - 1) * 4 + 4
print(h)


a = int(input())
ans = 1
cur = 0
for i in range(1, a):
	ans += cur + 4
	cur += 4
print(ans)


n = int(input())
rez = n * 2 - 1
for i in range(1, n):
	rez = rez + (i * 2 - 1) * 2
print(rez)


n = int(input())

def num_of_cells(n):
	if n == 1:
		return 1
	else:
		num = 4 * (n - 1) + num_of_cells(n - 1)
	return num
print(num_of_cells(n))


a = int(input())
if a == 1:
	print(1)
else:
	i = 1
	count = 1
	while i < a:
		p = i * 4
		count += p
		i += 1
	print(count)


import math
import sys
n = int(input())
r = 0
t = 1
for i in range(n - 1):
	r += t * 2
	t += 2
print(r + t)


x = int(input())
sum = 1
for i in range(1, x):
	sum = sum + 4 * i
print(sum)


array = [1, 1]
n = int(input())
for i in range(10005):
	array.append(0)
for i in range(2, n + 1):
	array[i] = array[i - 1] + 4 * (i - 1)
print(array[n])


q = int(input())
dp = [0] * 101
dp[0] = 1
for i in range(1, 101):
	dp[i] = dp[i - 1] + 4 * i
print(dp[q - 1])


n = int(input())
square = [0, 1]
for i in range(2, n + 1):
	square.append(square[i - 1] + i * 4 - 4)
print(square[n])


n = int(input())
cnt = 2 * n * (n - 1)
print(1 + cnt)


from sys import stdin
n = int(stdin.readline().rstrip())
a = 1
if n == 1:
	print(a)
else:
	p = 4
	for i in range(n - 1):
		a += p
		p += 4
	print(a)


memo = {i: 4 * (i - 1) for i in range(1, 101)}

def cells(n):
	global memo
	if n == 1:
		return 1
	return cells(n - 1) + memo[n - 1] + 4
print(cells(int(input())))


def main():
	n = int(input())
	if n == 1:
		return 1
	cell = 1
	gap = 4
	for i in range(2, n + 1):
		cell = cell + gap
		gap = gap + 4
	return cell
res = main()
print(res)


arr = [0] * 100
arr[0] = 1
for i in range(1, 100):
	arr[i] = arr[i - 1] + 4 + (i - 1) * 4
n = int(input())
print(arr[n - 1])


a = int(input())
s = 1
add = 4
for i in range(a - 1):
	s += add
	add += 4
print(s)


n = int(input())
totalCells = (2 * n - 1) ** 2
missingCells = 2 * (n - 1) * n
print(totalCells - missingCells)


def GetAmount(n):
	if n == 1:
		return 1
	return 4 * n - 4 + GetAmount(n - 1)
print(GetAmount(int(input())))


def di(n):
	s = 0
	for i in range(n):
		s += i
	return s
n = int(input())
print(1 + di(n) * 4)


n = int(input())
p = 2 * n ** 2 - 2 * n + 1
print(p)


n = int(input())
k = 2 * n - 1
m = 0
for i in range(k - 2, 0, -2):
	m += i
m *= 2
m += 2 * n - 1
print(m)


n = int(input())
lst = [0] * n
lst[0] = 1
sum = 0
for i in range(1, n):
	sum += 4
	lst[i] = lst[i - 1] + sum
print(lst[n - 1])


def plusOne(n):
	if n == 1:
		return 1
	if n == 0:
		return 0
	return 4 + (n - 2) * 4 + plusOne(n - 1)

def main():
	n = int(input())
	print(plusOne(n))
main()


def f(n):
	return 1 + (n * (n - 1) << 1)
print(f(int(input())))


n = int(input())
if n == 1:
	c = 1
else:
	c = n * n + (n - 1) * (n - 1)
print(c)


N = int(input().strip())

def solve(n):
	if n == 1:
		return 1
	return solve(n - 1) + (n - 1) * 4
print(solve(N))


n = int(input())
s = n * n + (n - 1) * (n - 1)
print(s)


n = int(input())

def noOfSquares(n):
	if n == 1:
		return 1
	return noOfSquares(n - 1) + 4 * (n - 1)
print(noOfSquares(n))


n = int(input())
cells = 1
for i in range(2, n + 1):
	cells = cells + 4 + 4 * (i - 2)
print(cells)


n = int(input())
s = 1
p = 4
for i in range(1, n):
	s += p
	p += 4
print(s)


n = int(input())
d = [1]
for i in range(2, n + 1):
	k = d[i - 2] + 4 * i - 4
	d.append(k)
print(d[n - 1])


l = [0, 1]
for i in range(2, 101):
	l.append(l[-1] + 4 * (i - 1))
n = int(input())
print(l[n])


x = int(input())
s = 0
for i in range(1, x * 2 - 1, 2):
	s = s + i * 2
s = s + x * 2 - 1
print(s)


n = int(input())
ans = 1
for k in range(1, n):
	ans += 4 * k
print(ans)


n = int(input())
dp = [0] * 101
dp[0] = 1
dp[1] = 5
for i in range(2, n):
	dp[i] = dp[i - 1] + 4 * i
print(dp[n - 1])


k = int(input())
a = 1
i = 0
b = 0
while i < k:
	a = a + b
	b = b + 4
	i = i + 1
print(a)


n = int(input())
count = 0
fcount = 0
for i in range(1, n + 1):
	if i == n:
		fcount += 2 * i - 1
		fcount += 2 * count
		break
	count += 2 * i - 1
print(fcount)


n = int(input())
l = [1]
x = 4
for i in range(101):
	l.append(l[-1] + x)
	x += 4
print(l[n - 1])


lis = [0 for _ in range(101)]
lis[1] = 1
lis[2] = 5
st = 8
for i in range(3, 101):
	lis[i] = lis[i - 1] + st
	st += 4
ind = int(input())
print(lis[ind])


n = int(input())
m = [1]
if n == 1:
	print(m[0])
else:
	for i in range(1, n):
		m.append(m[i - 1] + 2 * (i + 1) + 2 * (i - 1))
	print(m[-1])


def fastio():
	import sys
	from io import StringIO
	from atexit import register
	global input
	sys.stdin = StringIO(sys.stdin.read())
	input = lambda : sys.stdin.readline().rstrip('\r\n')
	sys.stdout = StringIO()
	register(lambda : sys.__stdout__.write(sys.stdout.getvalue()))
fastio()
MOD = 10 ** 9 + 7
INF = 10 ** 20
I = lambda : list(map(int, input().split()))
from collections import defaultdict as dd
from math import gcd
(n,) = I()
print(n ** 2 + (n - 1) ** 2)


def rhombus(a):
	if a < 1:
		return 0
	elif a == 1:
		return 1
	else:
		return a * 2 + (a - 2) * 2 + rhombus(a - 1)
n = int(input())
total = rhombus(n)
print(total)


import sys
import math
from collections import defaultdict as ddict
from collections import deque
import heapq
from queue import Queue
fast_inp = lambda : sys.stdin.readline().split('\n')[0]
read_list = lambda : fast_inp().split(' ')
read_listi = lambda : list(map(int, fast_inp().split(' ')))
read_listf = lambda : list(map(float, fast_inp().split(' ')))
read_int = lambda : int(fast_inp())
read_float = lambda : float(fast_inp())
read = lambda : fast_inp()
DEBUG = False

def debug(**kwargs):
	if not DEBUG:
		return
	print('*' * 20)
	for (k, v) in kwargs.items():
		print(f'\t{k}:{v}\t')
	print('*' * 20)
dp1 = [0] * 200
dp2 = [0] * 200
dp1[1] = 4
dp2[1] = 1
dp1[2] = 8
dp2[2] = 5

def solve() -> None:
	n = read_int()
	for i in range(3, n + 1):
		dp2[i] = dp2[i - 1] + dp1[i - 1]
		dp1[i] = dp1[i - 1] + 4
	print(dp2[n])
t = 1
for _ in range(t):
	solve()


import sys
n = int(sys.stdin.readline().strip())
print(n * n + (n - 1) * (n - 1))


def area(n):
	if n == 1:
		return 1
	a = area(n - 1) + 4 * (n - 1)
	return a
print(area(int(input())))


n = int(input())
s1 = n * (2 * 1 + (n - 1) * 2) - (1 + (n - 1) * 2)
print(s1)


num = int(input())
print(num ** 2 + (num - 1) ** 2)


n = int(input())
if n == 1:
	print('1')
elif n == 2:
	print('5')
else:
	print(n ** 2 + (n - 1) ** 2)


ll = lambda : list(map(int, input().split()))
testcases = 1
for testcase in range(testcases):
	[n] = ll()
	if n == 1:
		print(1)
	elif n == 2:
		print(5)
	else:
		n -= 1
		print(2 * n * (n + 1) + 1)


n = int(input())
a = 0
d = 4
print(1 + n * (2 * a + (n - 1) * d) // 2)


n = int(input())
plus = 0
s = 1
for i in range(n):
	s += plus
	plus += 4
print(s)


import sys
from collections import *
from math import *
import re

def inp_arr():
	return list(map(int, input().split()))

def inp():
	return map(int, input().split())

def lcm(a, b):
	return a * b / gcd(a, b)
max_int = sys.maxsize
mod = 10 ** 9 + 7
n = int(input())
print(2 * n ** 2 - 2 * n + 1)


n = int(input())
m = n * (n - 1)
ans = 1 + m // 2 * 4
if n == 1:
	print(1)
else:
	print(ans)


n = int(input())
t = 4 + (n - 2) * 4
sumi = int((n - 1) / 2 * (4 + t))
print(sumi + 1)


a = int(input())
t = a - 1
f = t * t
sum = a * a + f
print(sum)


x = int(input())

def rec(ab):
	if ab <= 3:
		if ab == 3:
			return 13
		elif ab == 2:
			return 5
		elif ab == 1:
			return 1
		else:
			return 0
	else:
		return rec(ab - 1) + (ab - 1) * 4
print(rec(x))


def getN():
	return int(input())

def getList():
	return list(map(int, input().split()))
n = getN()
mid = n * 2 - 1
ans = -mid
while mid > 0:
	ans += mid * 2
	mid -= 2
print(ans)


n = int(input())
n -= 1
res = 0
nn = 1
while nn <= 2 * n - 1:
	res += nn
	nn += 2
print(res * 2 + (2 * n + 1))


n = int(input())

def no_rhombus(n):
	r = 1
	for i in range(1, n):
		r += 4 * i
	return r
print(no_rhombus(n))


n = int(input())
cnt = 1
l = [2]
if n == 1:
	print(cnt)
	exit()
for i in range(n - 2):
	cnt = cnt + 2
	l.append(cnt * 2)
l.append(cnt + 2)
print(sum(l))


x = int(input())
c = 0
while x > 1:
	c += (x - 1) * 4
	x -= 1
print(c + 1)


number = int(input())
result = 2 * number * (number - 1) + 1
print(result)


N = int(input())
out = 4
value = 1
for i in range(1, N):
	value += out
	out = out + 4
print(value)


n = int(input()) - 1
mem = [1]

def f(n):
	if n == 0:
		return 1
	ret = 4 * n + f(n - 1)
	mem.append(ret)
	return ret
print(f(n))


n = int(input())
a = 0
for i in range(n):
	a += ((n - i) * 2 - 1) * 2
w = a - (n * 2 - 1)
print(w)


def solve(test):
	ans = 0
	n = int(input())
	ans = 1 + (n - 1) * n * 2
	print(ans)
t = 1
for _ in range(t):
	solve(_ + 1)


class cinn:

	def __init__(self):
		self.x = []

	def cin(self, t=int):
		if len(self.x) == 0:
			a = input()
			self.x = a.split()
			self.x.reverse()
		return self.get(t)

	def get(self, t):
		return t(self.x.pop())

	def clist(self, n, t=int):
		l = [0] * n
		for i in range(n):
			l[i] = self.cin(t)
		return l

	def clist2(self, n, t1=int, t2=int, t3=int, tn=2):
		l = [0] * n
		for i in range(n):
			if tn == 2:
				a1 = self.cin(t1)
				a2 = self.cin(t2)
				l[i] = (a1, a2)
			elif tn == 3:
				a1 = self.cin(t1)
				a2 = self.cin(t2)
				a3 = self.cin(t3)
				l[i] = (a1, a2, a3)
		return l

	def clist3(self, n, t1=int, t2=int, t3=int):
		return self.clist2(self, n, t1, t2, t3, 3)

	def cout(self, i, ans=''):
		if ans == '':
			print('Case #' + str(i + 1) + ':', end=' ')
		else:
			print('Case #' + str(i + 1) + ':', ans)

	def printf(self, thing):
		print(thing, end='')

	def countlist(self, l, s=0, e=None):
		if e == None:
			e = len(l)
		dic = {}
		for el in range(s, e):
			if l[el] not in dic:
				dic[l[el]] = 1
			else:
				dic[l[el]] += 1
		return dic

	def talk(self, x):
		print(x, flush=True)

	def dp1(self, k):
		L = [-1] * k
		return L

	def dp2(self, k, kk):
		L = [-1] * k
		for i in range(k):
			L[i] = [-1] * kk
		return L

	def isprime(self, n):
		if n == 1 or n == 0:
			return False
		for i in range(2, int(n ** 0.5 + 1)):
			if n % i == 0:
				return False
		return True

	def factors(self, n):
		from functools import reduce
		return set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0)))

	def nthprime(self, n):
		i = 0
		s = 2
		L = []
		while i < n:
			while not self.isprime(s):
				s += 1
			L.append(s)
			s += 1
			i += 1
		return L

	def matrixin(self, m, n, t=int):
		L = []
		for i in range(m):
			p = self.clist(n, t)
			L.append(p)
		return L

	def seive(self, k):
		n = k + 1
		L = [True] * n
		L[1] = False
		L[0] = False
		for i in range(2, n):
			if L[i] == True:
				for j in range(2 * i, n, i):
					L[j] = False
		return L

	def seiven(self, n, L):
		i = 0
		for j in range(len(L)):
			if L[j] == True:
				i += 1
			if i == n:
				return j

	def matrixin2(self, m, t=int):
		L = []
		for i in range(m):
			iny = self.cin(str)
			lsmall = []
			for el in iny:
				lsmall.append(t(el))
			L.append(lsmall)
		return L
c = cinn()
n = c.cin()
print((2 * n - 1) ** 2 - 2 * ((n - 1) ** 2 + n - 1))


n = int(input())
if n == 1:
	print('1')
if n != 1:
	print(int(1 + 4 * (n - 1) * (1 + n - 1) / 2))


import sys
n = int(sys.stdin.readline())
s = 1
for i in range(0, n):
	s += i * 4
print(s)


class Rhombus:
	n = int(input())
	aux = 1
	if n == 1:
		aux = 1
	else:
		aux = n * n + pow(n - 1, 2)
	print(aux)


n = int(input())
y = list()
for i in range(1, 2 * n):
	if i % 2 != 0:
		y.append(i)
x = sum(y) * 2 - y[n - 1]
print(x)


n = int(input())
count = 0
count = n * n + (n - 1) * (n - 1)
print(count)


def func(num):
	x = 2 * num - 1
	ans = x
	for i in range(x - 2, 0, -2):
		ans = ans + 2 * i
	return ans
n = input('')
num = int(n)
print(func(num))


n = int(input())
if n == 1:
	print(1)
else:
	count = 1
	step = 4
	for i in range(1, n):
		count += step
		step += 4
	print(count)


ab = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, 151, 153, 155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 177, 179, 181, 183, 185, 187, 189, 191, 193, 195, 197, 199, 201, 203, 205, 207, 209, 211, 213]
n = int(input())
bc = ab[n - 1]
total = 0
for i in range(1, bc, 2):
	total += i
cd = bc + 2 * total
print(cd)


def cal(n):
	if n == 1:
		return 1
	if n == 2:
		return 5
	else:
		return cal(n - 1) + 4 * (n - 1)
n = int(input())
print(cal(n))


n = int(input())
r = 0
for i in range(n):
	r = r + 4 * i
print(r + 1)


n = int(input())
dp = [0] * (n + 1)

def countRhombus(n):
	if dp[n] > 0:
		return dp[n]
	if n == 1:
		dp[n] = 1
	else:
		dp[n] = 4 * (n - 1) + countRhombus(n - 1)
	return dp[n]
print(countRhombus(n))


n = int(input())
sum1 = 1
while n >= 2:
	sum1 += 4 * (n - 1)
	n -= 1
print(sum1)


n = int(input())
temp = 2 * n - 3
mid = 2 * n - 1
sum = 0
while temp > 0:
	sum += temp
	temp = temp - 2
sum = 2 * sum
print(sum + mid)


x = int(input())
i = 0
a = 1
for k in range(x):
	a += i
	i += 4
print(a)


from sys import stdin, stdout

def main():
	line = int(stdin.readline())
	if line == 1:
		stdout.write(str(1))
	else:
		cont = 1
		while line > 1:
			cont += 4 * (line - 1)
			line -= 1
		stdout.write(str(cont))
main()


n = int(input())
ans = 0
p = 1
k = 4
for i in range(n):
	ans = ans + p
	p = k
	k = k + 4
print(ans)


import sys
import bisect
t = 1
for _ in range(t):
	n = int(input())
	ans = (n - 1) * (2 * 4 + (n - 2) * 4) // 2
	print(ans + 1)


n = int(input())
k = 2 * n - 1
s = 0
for i in range(1, k + 1):
	if i % 2 == 1:
		s += 2 * i
s = s - k
print(s)


n = int(input())
cells = 1
if n == 1:
	print(cells)
else:
	for x in range(2, n + 1):
		cells += 4 * (x - 1)
	print(cells)


n = int(input())
if n == 1:
	print(1)
else:
	p = 0
	for k in range(1, n):
		p += 1 + (k - 1) * 2
	print(p * 2 + 1 + (n - 1) * 2)


def sum(n):
	return n * (n + 1) / 2
n = int(input())
result = int((2 * n - 1) ** 2 - 4 * ((n - 1) ** 2 - sum(n - 2)))
print(result)


n = int(input())
dp = []
dp.append(0)
dp.append(1)
for i in range(2, n + 1):
	temp = dp[i - 1] + 4 * (i - 1)
	dp.append(temp)
print(dp[n])


n = int(input())
no = 2 * n ** 2 - (2 * n - 1)
print(no)


t = int(input())
sum1 = 0
i = j = 1
while i < t:
	sum1 += j * 2
	j += 2
	i += 1
print(sum1 + t * 2 - 1)


n = int(input())
cur = 1
start = 4
for i in range(1, n):
	cur += start
	start += 4
print(cur)


n = int(input())
from math import ceil
x = (n * 2 - 1) ** 2 / 2
print(ceil(x))


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, queue, copy
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def I():
	return int(sys.stdin.readline())

def LS():
	return sys.stdin.readline().split()

def S():
	return input()

def main():
	n = I()
	if n == 1:
		return 1
	n -= 1
	return n ** 2 + (n + 1) ** 2
print(main())


n = int(input())
d = [1, 4]
if n > 2:
	for t in range(2, n + 1):
		d.append(d[-1] + 4)
print(sum(d[:n]))


import sys

class AAlexAndARhombus:

	def solve(self):
		n = int(input())
		if n == 1:
			print(1)
		else:
			print(1 + 2 * (n - 1) + 2 * (n - 2) * (n - 1) + 2 * (n - 1))
solver = AAlexAndARhombus()
input = sys.stdin.readline
solver.solve()


j = 1
l = [0, 1]
for i in range(1, 101):
	l.append(l[-1] + j + j + 2)
	j += 2
print(l[int(input())])


a = {}

def rh(n):
	if n == 1:
		a[n] = 1
		return 1
	elif n in a:
		return a[n]
	else:
		f = rh(n - 1) + 4 * (n - 1)
		return f
n = int(input())
print(rh(n))


n = int(input())
ls = [0, 1]
for i in range(1, n):
	ls.append(ls[i] + 4 * i)
print(ls[-1])


n = int(input())
if n == 1:
	print(1)
else:
	first = 1
	for i in range(n - 2):
		first += 2
	terms = (first - 1) // 2 + 1
	sum1 = terms * (first + 1) // 2
	print(2 * sum1 + first + 2)


n = int(input())
a = 1
for i in range(n):
	a = a + 4 * i
print(a)


n = int(input().strip())
r = 1
for i in range(n):
	r += 4 * i
print(r)


n = int(input())

def solve(num):
	return num ** 2 + (num - 1) ** 2
print(str(solve(n)))


n = int(input())
lst = [1]
for c in range(1, n):
	k = c * 4 + lst[-1]
	lst.append(k)
print(lst[-1])


n = int(input())
m = n - 2
ans = 2 * m ** 2 + 4 * m + 1 + 2 * n
print(ans)


t = int(input())
s = [0] * 101
s[1] = 1
for i in range(2, len(s)):
	s[i] = s[i - 1] + (i - 1) * 4
print(s[t])


while True:
	try:
		s = int(input())
		print(2 * s * (s - 1) + 1)
	except:
		break


import sys
import math
input = sys.stdin.readline
n = int(input())
arr = [1, 5]
cur = 8
for i in range(100):
	arr.append(arr[-1] + cur)
	cur += 4
print(arr[n - 1])


n = int(input())
if n == 1:
	print(1)
elif n == 2:
	print(5)
elif n % 2 == 0:
	print((n - 1) ** 2 + n ** 2)
else:
	c = 0
	for i in range(n):
		if i % 2 != 0:
			c += i
	print(c * 4 + n ** 2)


N = int(input())
count = 0
for val in range(1, 2 * N - 1, 2):
	count += 2 * val
count += 2 * N - 1
print(count)


from math import floor
n = int(input())
rows = 2 * n - 1
repeated = floor(rows / 2)
cells = 0
for x in range(repeated):
	cells += (2 * x + 1) * 2
cells += rows
print(cells)


n = int(input())
d = [0] * 101
d[1] = 1
d[2] = 5
d[3] = 13
for i in range(4, n + 1):
	d[i] = d[i - 1] + 4 * (i - 1)
print(d[n])


n = int(input())
a = [0, 1, 5]
for i in range(3, 101):
	a.append(a[-1] + 4 * (i - 1))
print(a[n])


n = int(input())
c = 1
for x in range(2, n + 1):
	c = c + 4 * (x - 1)
print(c)


print((lambda n: 2 * n * (n + 1) - 4 * n + 1)(int(input())))


ans = []
ans.append(1)
ans.append(5)
for i in range(3, 101):
	novo = ans[i - 2]
	novo += 4
	novo += ans[i - 2] - ans[i - 3]
	ans.append(novo)
n = int(input())
print(ans[n - 1])


q = int(input())
print(1 + 2 * q * (q - 1))


import sys
import math
fileoperation = 0
if fileoperation:
	orig_stdout = sys.stdout
	orig_stdin = sys.stdin
	inputfile = open('W:/Competitive Programming/input.txt', 'r')
	outputfile = open('W:/Competitive Programming/output.txt', 'w')
	sys.stdin = inputfile
	sys.stdout = outputfile
mod = 1000000007

def nospace(l):
	ans = ''.join((str(i) for i in l))
	return ans
t = 1
for tt in range(t):
	n = int(input())
	n -= 1
	print(2 * n * (n + 1) + 1)
if fileoperation:
	sys.stdout = orig_stdout
	sys.stdin = orig_stdin
	inputfile.close()
	outputfile.close()


n = int(input())
output = n ** 2 + (n - 1) ** 2
print(output)


def calcul(n):
	if n == 1:
		return 1
	else:
		return calcul(n - 1) + (n - 1) * 4
n = int(input())
print(calcul(n))


def iinput():
	return [int(i) for i in input().split()]
pref = [1]
cur = 4
for i in range(99):
	pref += [pref[i] + cur]
	cur += 4
print(pref[int(input()) - 1])


import sys
import math
input = sys.stdin.readline
n = int(input())
l = [1] * 100
for i in range(1, 100):
	n1 = i + 1
	l[i] = l[i - 1] + 4 * n1 - 4
print(l[n - 1])


n = int(input())
pos = 1
value = 1
center = 1
while pos < n:
	value += 2 * center + 2
	center += 2
	pos += 1
print(value)


l = []
A = 1
for i in range(0, 100):
	if i == 0:
		l.append(1)
	else:
		l.append(l[i - 1] + 4 * A)
		A += 1
n = int(input())
print(l[n - 1])


def rec(x):
	if x == 1:
		return 1
	else:
		return rec(x - 1) + 4 * (x - 1)
n = int(input())
ans = rec(n)
print(ans)


import sys
sys.setrecursionlimit(int(10000000.0))

def main():
	n = int(input().strip())
	print(2 * (n * (n - 1)) + 1)
	return
while 1:
	try:
		main()
	except EOFError:
		break


def solve(n):
	return sum([qc * 4 for qc in range(1, n)]) + 1
n = int(input())
print(solve(n))


n = int(input())
if n % 2 == 0:
	print((n - 1) ** 2 + 4 * (n * (n + 1) // 2 - n * (n + 2) // 4))
else:
	print(n ** 2 + 4 * ((n - 2) * (n - 1) // 2 - (n - 2) // 2 * ((n - 2) // 2 + 1)))


def dp(n):
	result = 1
	for i in range(n):
		result += i * 4
	return result
n = int(input())
print(dp(n))


a = int(input())
if a == 1:
	print('1')
else:
	sum = a * a + (a - 1) * (a - 1)
	print(sum)


n = int(input())
if n == 1:
	print(n)
elif n >= 2:
	ans = (n - 1) ** 2 + n ** 2
	print(ans)


import sys
from collections import defaultdict as dd
from collections import deque
from functools import *
from fractions import Fraction as f
from copy import *
from bisect import *
from heapq import *
from math import *
from itertools import permutations

def eprint(*args):
	print(*args, file=sys.stderr)
zz = 1
if zz:
	input = sys.stdin.readline
else:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('all.txt', 'w')

def inc(d, c):
	d[c] = d[c] + 1 if c in d else 1

def li():
	return [int(xx) for xx in input().split()]

def fli():
	return [float(x) for x in input().split()]

def comp(a, b):
	if a > b:
		return 2
	return 2 if a == b else 0

def gi():
	return [xx for xx in input().split()]

def fi():
	return int(input())

def pro(a):
	return reduce(lambda a, b: a * b, a)

def swap(a, i, j):
	(a[i], a[j]) = (a[j], a[i])

def si():
	return list(input().rstrip())

def mi():
	return map(int, input().split())

def gh():
	sys.stdout.flush()

def isvalid(i, j):
	return 0 <= i < n and 0 <= j < n

def graph(n, m):
	for i in range(m):
		(x, y) = mi()
		a[x].append(y)
		a[y].append(x)
t = 1
while t > 0:
	t -= 1
	n = fi()
	p = 1
	for i in range(n - 1):
		p += 4 * i + 4
	print(p)


def answer(n):
	if n == 1:
		return 1
	else:
		return answer(n - 1) + 4 * (n - 1)
n = int(input())
print(answer(n))


from __future__ import division, print_function
import itertools, os, sys, threading
from collections import deque, Counter, OrderedDict, defaultdict
from math import ceil, floor, log, sqrt, factorial, pow, pi

def ii():
	return int(input())

def si():
	return str(input())

def mi():
	return map(int, input().split())

def li():
	return list(mi())
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod = 1000000007
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def getKey(item):
	return item[0]

def sort2(l):
	return sorted(l, key=getKey)

def d2(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def ntl(n):
	return [int(i) for i in str(n)]

def powerMod(x, y, p):
	res = 1
	x %= p
	while y > 0:
		if y & 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
graph = defaultdict(list)
visited = [0] * 1000000
col = [-1] * 1000000

def dfs(v, c):
	if visited[v]:
		if col[v] != c:
			print('-1')
			exit()
		return
	col[v] = c
	visited[v] = 1
	for i in graph[v]:
		dfs(i, c ^ 1)

def bfs(d, v):
	q = []
	q.append(v)
	visited[v] = 1
	while len(q) != 0:
		x = q[0]
		q.pop(0)
		for i in d[x]:
			if visited[i] != 1:
				visited[i] = 1
				q.append(i)
		print(x)

def make_graph():
	d = {}
	(v, e) = mi()
	for i in range(e):
		(x, y) = mi()
		if x not in d.keys():
			d[x] = [y]
		else:
			d[x].append(y)
		if y not in d.keys():
			d[y] = [x]
		else:
			d[y].append(x)
	return d

def gr2(n):
	d = {}
	for i in range(n):
		(x, y) = mi()
		if x not in d.keys():
			d[x] = [y]
		else:
			d[x].append(y)
	return d
n = ii()
x = pow(n - 1, 2) + pow(n, 2)
print(int(x))


order = int(input())
ans = 0
if order == 1:
	ans = 1
elif order == 2:
	ans = 5
else:
	exp = (order - 1) * (order - 1)
	ans = order * order + exp
print(ans)


def calc(n):
	if n == 1:
		return 1
	return 4 * (n - 1) + calc(n - 1)
n = int(input())
print(calc(n))


pra = int(input())
print(2 * pra ** 2 - 2 * pra + 1)


from sys import stdin

def solve():
	n = int(input())
	ans = 1
	add = 4
	for i in range(1, n):
		ans += add
		add += 4
	return ans
print(solve())


import sys, math, queue, bisect
MOD = 10 ** 9 + 7
sys.setrecursionlimit(1000000)
n = int(input())
a = 1
p = 4
n -= 1
while n > 0:
	a += p
	p += 4
	n -= 1
print(a)


n = int(input())
i = 1
sol = 1
if n == 1:
	print(1)
elif n == 2:
	print(5)
else:
	sol += 2 * (n - 1) * n
	print(sol)


import sys
import math
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
n = inp()
print(1 + 2 * n * (n - 1))


n = int(input())
a = 1
d = 2
sum = 0
res = a + (n - 1) * d
for i in range(1, n):
	sum = sum + (a + (i - 1) * d)
sum = sum * 2
print(sum + res)


a = int(input())
b = 1
if a == 1:
	print(b)
else:
	r = 2
	while True:
		b = b + 4 * (r - 1)
		if a == r:
			print(b)
			break
		r = r + 1


n = int(input())

def count(x):
	if x != 1:
		return count(x - 1) + (2 * x - 1) + 2 * (x - 1) - 1
	else:
		return 1
print(count(n))


n = int(input())
d = {1: 1}
for i in range(1, 101):
	d[i + 1] = d[i] + 4 * i
	if i + 1 >= n:
		break
print(d[n])


n = int(input())
k = 4
s = 1
for i in range(n - 1):
	t = 4 + (k - 4) // 2
	k = t * 2 + 4
	s += t
print(s)


n = int(input())
if n == 1:
	print(1)
	exit()
s = 1
for i in range(2, n + 1):
	s += 2 * i + 2 * (i - 2)
print(s)


n = int(input())
l = [0 for i in range(n)]
l[0] = 1
for i in range(1, len(l)):
	l[i] = i * 4 + l[i - 1]
print(l[n - 1])


a = int(input())
if a == 1:
	print(1)
else:
	print(a * 2 * (a - 1) + 1)


t = int(input())
dp = [0] * t
dp[0] = 1
counter = 1
for i in range(1, t):
	dp[i] = dp[i - 1] + 4 * i
print(dp[-1])


n = int(input())
su = n * 2 - 1
n1 = 0
for i in range(1, 3 + (n - 3) * 2 + 1, 2):
	n1 += i
su += n1 * 2
print(su)


n = int(input())
kolkl = 2 * n ** 2 + 1
kolkl1 = 2 * n
print(kolkl - kolkl1)


n = int(input())
if n == 1:
	print(n)
else:
	sum = 0
	for i in range(1, 2 * n, 2):
		sum += i
		if i == 2 * n - 3:
			sum *= 2
	print(sum)


n = int(input())
sum_out = 1
for i in range(n):
	sum_out += 4 * i
print(sum_out)


n = int(input())
f = 4
r = 1
if n == 1:
	print(r)
else:
	while n - 1 > 0:
		r = r + f
		f = f + 4
		n = n - 1
	print(r)


n = [int(k) for k in input().split(' ')][0]

def tri(n):
	return n * (n + 1) // 2
print(tri(n) + 2 * tri(n - 1) + tri(n - 2))


def sol(A):
	sum = 1
	for i in range(1, n + 1):
		sum += 4 * (i - 1)
	return sum
n = int(input())
p = sol(n)
print(p)


n = int(input())
a = 2 * n - 1
a1 = a - 2
sum = (n - 1) * (a1 + 1)
print(sum + a)


n = 1
inp = int(input())
for i in range(1, inp + 1):
	n = n + (inp - i) * 4
print(n)


from math import sqrt

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(mi())

def si():
	return input()
a = [0] * 101
a[1] = 1
k = 4
for i in range(2, 101):
	a[i] = a[i - 1] + k
	k += 4
n = ii()
print(a[n])


n = int(input())
list = [1]
k = 1
for i in range(0, 101):
	list.append(list[i] + 4 * k)
	k = k + 1
print(list[n - 1])


m = int(input())
d = m - 2
print(m * 4 - 3 + (2 + d - 1) * d * 2)


n = int(input())
t = 1
for i in range(n):
	t += 4 * i
print(t)


from sys import setcheckinterval, stdin
setcheckinterval(1000)
iin = lambda : int(stdin.readline())
lin = lambda : list(map(int, stdin.readline().split()))
n = iin()
sol = 1
for i in range(1, n):
	sol += 4 * i
print(sol)


n = int(input())
summ = 1
for i in range(1, n):
	summ += i * 4
print(summ)


from sys import stdin
r = stdin.readline

def main():
	n = int(r())
	ans = (n + (n - 1)) ** 2
	res = n * (n + 1) // 2 - n
	ans -= 4 * res
	print(ans)
main()


def multi(n):
	while n > 0:
		if n == 1:
			return 1
		else:
			return 4 * (n - 1) + multi(n - 1)
n = int(input())
num = multi(n)
print(num)


n = int(input())
sum1 = 0
for i in range(n):
	sum1 = sum1 + i
print(1 + 4 * sum1)


import sys
from math import sqrt, floor, factorial
from collections import deque, Counter
inp = sys.stdin.readline
read = lambda : list(map(int, inp().strip().split()))

def solve():
	n = int(inp())
	print(n ** 2 + (n - 1) ** 2)
solve()


n = int(input())
dp = [0]
ans = 1
for i in range(1, n):
	dp.append(4 + dp[i - 1])
	ans += dp[i]
print(ans)


def func(x):
	if x == 1:
		return 1
	return func(x - 1) + 4 * (x - 1)
print(func(int(input())))


def BuubleSort(n):
	if n == 1:
		return 1
	sum = 1
	for i in range(1, n):
		sum += 4 * i
	return sum

def main():
	n = int(input())
	a = BuubleSort(n)
	print(a)
main()


import sys, math

def read_int():
	return int(sys.stdin.readline().strip())

def read_int_list():
	return list(map(int, sys.stdin.readline().strip().split()))

def read_string():
	return sys.stdin.readline().strip()

def read_string_list(delim=' '):
	return sys.stdin.readline().strip().split(delim)

def print_list(l):
	print(' '.join(map(str, l)))
n = read_int()
ans = 1
for i in range(1, n):
	ans += 4 * i
print(ans)


n = int(input())

def factorial(n):
	if n == 1:
		return 1
	else:
		return 4 * (n - 1) + factorial(n - 1)
print(factorial(n))


def R():
	return map(int, input().split())

def I():
	return int(input())

def S():
	return str(input())

def L():
	return list(R())
from collections import Counter
import math
import sys
from itertools import permutations
n = I()
print(1 + n * (n - 1) * 2)


n = int(input())
sp = 1
res = 0
for i in range(n - 1):
	res += sp * 2
	sp += 2
res += sp
print(res)


def cal(n):
	if n == 1:
		return 1
	else:
		return 4 * (n - 1) + cal(n - 1)
n = int(input())
print(cal(n))


n = int(input())
c = 1 + 4 * sum(range(n))
print(c)


n = int(input())
a = []
a.append(1)
a.append(5)
of3 = 0
of2 = 0
nf3 = 1
nf2 = 0
for i in range(3, 101):
	sum = 0
	of2 += nf2
	of3 += 1
	nf2 += 1
	sum = 4 * (nf3 + nf2 + of2 + of3) + 1
	a.append(sum)
print(a[n - 1])


n = int(input())
a = [1]
if n == 1:
	print('1')
else:
	for x in range(1, n):
		a.append(4 * x)
	print(sum(a))


var = 1
for i in range(1, int(input())):
	var += 4 * i
print(var)


t = int(input())
c = 0
if t == 1:
	print(1)
	exit()
if t % 2 == 0:
	c = c + (2 * t - 1)
	t = t - 1
elif t % 2 == 1:
	c = c + (2 * (t - 1) + 1)
	t = t - 1
while True:
	if t == 1:
		c = c + 1 * 2
		break
	elif t % 2 == 0:
		c = c + 2 * (2 * t - 1)
		t = t - 1
	elif t % 2 == 1:
		c = c + 2 * (2 * (t - 1) + 1)
		t = t - 1
print(c)


def main():
	n = int(input())
	sum = 0
	while 1:
		if n == 1:
			break
		sum += (n - 1) * 4
		n = n - 1
	sum += 1
	print(sum)
main()


n = int(input())
print(2 * n * n - 2 * n + 1)
aaaaaaaaaaaaa = 0


n = int(input())
l = []
k = []
for i in range(1, 2 * n + 1, 2):
	l.append(i)
y = max(l)
z = sum(l)
x = 2 * z - y
print(x)


n = int(input())
squares = 1
for i in range(1, n + 1):
	squares += 4 * (i - 1)
print(squares)


while True:
	try:
		inpt = int(input())
		inpt = inpt * inpt + (inpt - 1) * (inpt - 1)
		print(inpt)
	except EOFError:
		break


gi = lambda : list(map(int, input().strip().split()))
(n,) = gi()
m = n - 1
ans = 0
while m:
	ans += (m - 1) * 2 + 1
	m -= 1
ans *= 2
ans += (n - 1) * 2 + 1
print(ans)


a = int(input())
print(pow(a, 2) + pow(a - 1, 2))


t = 1
for test in range(t):
	n = int(input())
	ans = 2 * n - 1
	tmp = ans - 2
	tmp_sum = 0
	for i in range(ans // 2):
		tmp_sum += tmp
		tmp -= 2
	ans += 2 * tmp_sum
	print(ans)


def dp(n):
	if n == 1:
		return 1
	else:
		return dp(n - 1) + 4 * (n - 1)
N = int(input())
print(dp(N))


def f(x):
	j = x - 1
	p = (x ** 2 + x) // 2
	q = (j ** 2 + j) // 2
	return p + q
x = int(input())
print(f(x) + f(x - 1))


def xxx(x):
	if x == 1:
		return 1
	else:
		return (x - 1) * 4 + xxx(x - 1)
print(xxx(int(input())))


n = int(input())
l = []
while n != 1:
	a = 4 * (n - 1)
	l.append(a)
	n = n - 1
print(sum(l) + 1)


n = int(input())
memory = [1]
for i in range(2, n + 1):
	memory.append(memory[i - 2] + (i - 1) * 4)
print(memory[n - 1])


n = int(input())
count = 1
for i in range(n):
	count += 4 * i
print(count)


n = int(input())
h = n * 2 - 1
print(sum(range(1, h + 1, 2)) * 2 - h)


def rhom(n):
	dp = [0, 1, 5]
	for i in range(3, n + 1):
		dp.append(2 * dp[i - 1] - dp[i - 2] + 4)
	print(dp[n])
n = int(input())
rhom(n)


from collections import deque
from collections import Counter
from itertools import permutations
import heapq

def counterExample():
	arr = [1, 3, 4, 1, 2, 1, 1, 3, 4, 3, 5, 1, 2, 5, 3, 4, 5]
	counter = Counter(arr)
	top_three = counter.most_common(3)
	print(top_three)
q = deque()
import math

def main():
	n = int(input())
	n -= 1
	print(n ** 2 * 2 + 2 * n + 1)
main()


def soln() -> None:

	def logic() -> None:
		n = int(input())
		ans = 1 + 2 * n * (n - 1)
		print(ans)
	logic()
soln()


x = int(input())

def rhombus(x):
	if x == 1:
		return 1
	else:
		return rhombus(x - 1) + 4 * (x - 1)
print(rhombus(x))


n = int(input())
mid = n * 2 - 1
count = mid
for i in range(1, n):
	count += 2 * (mid - 2 * i)
print(count)


n = int(input())
answer = 0
for i in range(1, 2 * n - 2, 2):
	answer += i
print(answer * 2 + 2 * n - 1)


n = int(input())
result = 0
base = 2 * (n - 1) + 1
for x in range(base - 1, 0, -1):
	if x % 2 != 0:
		result += x
print(base + result * 2)


x = int(input())
ans = 1
while x > 1:
	ans += 4 * (x - 1)
	x -= 1
print(ans)


import sys
from random import choice, randint
inp = sys.stdin.readline
out = sys.stdout.write
flsh = sys.stdout.flush
sys.setrecursionlimit(10 ** 9)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def MI():
	return map(int, inp().strip().split())

def LI():
	return list(map(int, inp().strip().split()))

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines().strip()]

def LI_():
	return [int(x) - 1 for x in inp().strip().split()]

def LF():
	return [float(x) for x in inp().strip().split()]

def LS():
	return inp().strip().split()

def I():
	return int(inp().strip())

def F():
	return float(inp().strip())

def S():
	return inp().strip()

def pf(s):
	return out(s + '\n')

def JA(a, sep):
	return sep.join(map(str, a))

def JAA(a, s, t):
	return s.join((t.join(map(str, b)) for b in a))

def main():
	n = I()
	dp = [0] * (n + 1)
	dp[1] = 1
	for i in range(2, n + 1):
		dp[i] = dp[i - 1] + 4 * (i - 1)
	pf(str(dp[n]))
main()


n = int(input())
q = n * (n - 1) // 2
print(q * 4 + 1)


from sys import *
n = int(stdin.readline())
ans = 1
n -= 1
x = n * (n + 1) // 2
ans += 4 * x
print(ans)


import math

def cells(n):
	if n == 1:
		return 1
	else:
		return 4 * (n - 1) + cells(n - 1)
n = int(input())
print(cells(n))


from math import *
from cmath import *
from itertools import *
from decimal import *
from fractions import *
from sys import *
for _ in range(1):
	n = int(input())
	print(2 * n ** 2 - 2 * n + 1)


t = int(input())
r = 1
for i in range(1, t):
	r += 4 * i
print(r)


order = int(input())
res = 0
if order == 1:
	res = 1
elif order == 2:
	res = 5
else:
	aux = (order - 1) * (order - 1)
	res = order * order + aux
print(res)


n = int(input())
if n == 1:
	print(n * n)
else:
	a = n * n + (n - 1) * (n - 1)
	print(a)


def calc(n):
	if n == 0:
		return 1
	else:
		return n * 4 + calc(n - 1)
n = int(input())
x = calc(n - 1)
print(x)


n = int(input())
s = 0
if n == 1:
	print(1)
else:
	s = (n - 1) * (2 + (n - 2) * 2)
	s = s + 1 + (n - 1) * 2
	print(s)


x = input()
x = int(x)
y = 2 * x * x - 2 * x + 1
y = str(y)
print(y)


import sys
n = int(input())
res = 1
a = 4
for i in range(2, n + 1):
	res += a
	a += 4
print(res)


def rhombtiles(size):
	if size == 0:
		return 1
	else:
		return rhombtiles(size - 1) + (size - 1) * 4
print(rhombtiles(int(input())))


n = int(input())
t = n + n - 1
s = t
while t > 1:
	s += 2 * (t - 2)
	t -= 2
print(s)


n = int(input())

def re(n):
	if n == 1:
		return 1
	return n * n + (n - 1) ** 2
print(re(n))


n = int(input())
if n == 1:
	print(1)
else:
	edge = 4
	cell = 1
	for i in range(2, n + 1):
		ed3 = 4
		ed2 = edge - ed3
		temp = ed3 * 3 + ed2 / 2 * 2
		cell += int((temp + edge) / 4)
		edge = temp
	print(cell)


n = int(input())
dp = []
for i in range(n):
	dp.append(0)

def rhombus(n):
	dp[0] = 1
	for i in range(1, n):
		dp[i] = dp[i - 1] + 4 * i
	print(dp[-1])
rhombus(n)


n = int(input())
counter = 1
step = 4
for i in range(n - 1):
	counter += step
	step += 4
print(counter)


n = int(input())
s = []
for i in range(n - 1):
	s.append(2 * i + 1)
	s.append(2 * i + 1)
s.append(2 * n - 1)
print(sum(s))


n = int(input())

def rombus(n):
	if n < 2:
		return 1
	return 4 * (n - 1) + rombus(n - 1)
print(rombus(n))


n = int(input())
x = 1
for i in range(2, n + 1):
	x = x + 4 * (i - 1)
print(x, end='')


n = int(input())

def rhombuscal(n):
	if n == 1:
		return 1
	return 4 * (n - 1) + rhombuscal(n - 1)
print(rhombuscal(n))


n = int(input())

def find_ans(n):
	if n == 1:
		return 1
	else:
		return 4 * (n - 1) + find_ans(n - 1)
print(find_ans(n))


n = int(input())
k = 1
for i in range(1, n):
	g = k + 4 * i
	k = g
print(k)


n = int(input())
blocks = 1
add = 4
for x in range(1, n):
	blocks += add
	add += 4
print(blocks)


n = int(input())
o = 2 * n - 1
o1 = o - 2
while o1 > 0:
	o += 2 * o1
	o1 -= 2
print(o)


n = int(input())
cell = (n - 1) ** 2 + n ** 2
print(cell)


n = int(input())
a = 0
if n == 1:
	print(1)
else:
	while n > 0:
		a += 4 * (n - 1)
		n -= 1
	print(a + 1)


def solve(n):
	ans = 0
	tmp = 0
	for i in range(1, n):
		tmp += 2 * i - 1
	ans = tmp * 2 + (2 * n - 1)
	return ans
n = int(input())
ans = solve(n)
print(ans)


n = int(input())
l = []
l.append(0)
l.append(1)
prev = 0
for i in range(2, n + 1):
	temp = 4 * (i - 1) + l[i - 1]
	l.append(temp)
print(l[-1])


def add(n):
	rez = 1
	if n == 1:
		return n
	else:
		for i in range(2, n + 1):
			nrp = 4 * (i - 1)
			rez = rez + nrp
		return rez
n = int(input())
print(add(n))


n = int(input().strip())
ans = 1 + n / 2 * (4 * (n - 1))
print(int(ans))


N = int(input())
sum = 1
for i in range(1, N):
	sum += 4 * i
print(sum)


def getNumOfCells(n):
	if n == 1:
		return 1
	return getNumOfCells(n - 1) + (n - 1) * 4
x = int(input())
print(getNumOfCells(x))


def rohmbus(n):
	n = n + 1
	sum1 = 0
	for i in range(n - 1):
		sum1 += 2 * (2 * i - 1)
	sum1 += 2 * n - 1
	return sum1
print(rohmbus(int(input())))


n = int(input())
ans = 2 * n - 1
n -= 1
while n > 0:
	ans += 2 * (2 * n - 1)
	n -= 1
print(ans)


dp = {}

def alex_rumb(it):
	if it == 1:
		dp[it] = 1
	if it in dp:
		return dp[it]
	dp[it] = 4 * (it - 1) + alex_rumb(it - 1)
	return dp[it]
T = int(input())
print(alex_rumb(T))


a = [1, 5, 13]
n = int(input(''))
for i in range(3, 105):
	a.append(a[i - 1] + i * 4)
print(a[n - 1])


order = int(input())

def cells_per_row(row):
	if row == 1:
		return 1
	return 4 * (row - 1)
cells = sum(map(cells_per_row, range(1, order + 1)))
print(cells)


def getThreeNum(nNum):
	temNum = 0
	if nNum == 1:
		print(1)
	else:
		for i in range(0, nNum):
			temNum += i
		resultNum = temNum * 4 + 1
		print(resultNum)
nNum = int(input())
getThreeNum(nNum)


n = int(input())
wynik = n - 2
result = n + wynik
print(n * result + 1)


a = int(input())
an = 4 * (a - 1)
if a == 1:
	print(1)
else:
	print((4 * (a - 1) + 4) // 2 * (a - 1) + 1)


A = eval(input())
print(2 * (A - 1) ** 2 + (A * 2 - 1))


n = int(input())
number = 2 * n - 1
if n > 1:
	number += 2 * (n - 1) * (n - 1)
print(number)


N = int(input())
ans = 0
cur = 1
for i in range(N - 1):
	ans += cur
	cur += 2
ans *= 2
print(ans + cur)


n = int(input())
tot = 1
for i in range(1, n):
	tot += 4 * i
print(tot)


n = int(input().strip())
if n % 2 == 0:
	result = 0
	for i in range(1, n, 2):
		result += i * 4
	result += (n - 1) * (n - 1)
	print(result)
else:
	result = 0
	for i in range(1, n, 2):
		result += i * 4
	result += n * n
	print(result)


a = int(input())
prev = 1
for i in range(1, a + 1):
	prev = prev + (i - 1) * 4
print(prev)


import sys
import heapq
import re
from itertools import permutations
from bisect import bisect_left, bisect_right
from collections import Counter, deque
from math import factorial, sqrt, gcd, ceil
from functools import lru_cache, reduce
INF = 1 << 60
MOD = 1000000007
sys.setrecursionlimit(10 ** 7)

def main(n):
	ret = 1
	a = 1
	b = 3
	for i in range(n - 1):
		ret += a
		ret += b
		a += 2
		b += 2
	return ret
n = int(input())
print(main(n))


a = int(input())
lt = [1]
for i in range(1, a):
	lt.append(i * 4 + lt[-1])
print(lt[-1])


num = int(input())
sum = 1
for i in range(num):
	if i < num - 1:
		sum += (2 * i + 1) * 2
	else:
		sum += 2 * i
print(sum)


n = int(input())

def num_of_cells(n):
	if n == 1:
		return 1
	elif n == 2:
		return 5
	else:
		return ((2 * n - 1) * 4 - 12) // 2 + 4 + num_of_cells(n - 1)
print(num_of_cells(n))


mod = 1000000007
ii = lambda : int(input())
si = lambda : input()
dgl = lambda : list(map(int, input()))
f = lambda : map(int, input().split())
il = lambda : list(map(int, input().split()))
ls = lambda : list(input())
n = ii()
print(1 + 4 * ((n - 1) * n) // 2)


import math
n = int(input())
result = int(math.pow(n, 2) + math.pow(n - 1, 2))
print(result)


import math
from collections import Counter
n = int(input())
k = 2 * n - 1
s = 0
while k > 0:
	s += k
	k -= 2
print(2 * s - (2 * n - 1))


import math
n = int(input())
t = 2 * n - 1
v = 1
c = 0
a = 0
m = math.ceil(t / 2)
while c < t:
	a += v
	if c < m - 1:
		v += 2
	else:
		v -= 2
	c += 1
print(a)


n = int(input())
full = 1 + (n - 1) * 2
area = full ** 2
area -= 4 * (n * (n - 1) // 2)
print(area)


array = [1, 1]
n = int(input())
for i in range(10005):
	array.append(0)
array[1] = 1
array[2] = 5
array[3] = 13
array[4] = 25
array[5] = 41
array[6] = 61
array[7] = 85
array[8] = 113
array[9] = 145
array[10] = 181
array[11] = 221
array[12] = 265
array[13] = 313
array[14] = 365
array[15] = 421
array[16] = 481
array[17] = 545
array[18] = 613
array[19] = 685
array[20] = 761
array[21] = 841
array[22] = 925
array[23] = 1013
array[24] = 1105
array[25] = 1201
array[26] = 1301
array[27] = 1405
array[28] = 1513
array[29] = 1625
array[30] = 1741
array[31] = 1861
array[32] = 1985
array[33] = 2113
array[34] = 2245
array[35] = 2381
array[36] = 2521
array[37] = 2665
array[38] = 2813
array[39] = 2965
array[40] = 3121
array[41] = 3281
array[42] = 3445
array[43] = 3613
array[44] = 3785
array[45] = 3961
array[46] = 4141
array[47] = 4325
array[48] = 4513
array[49] = 4705
array[50] = 4901
array[51] = 5101
array[52] = 5305
array[53] = 5513
array[54] = 5725
array[55] = 5941
array[56] = 6161
array[57] = 6385
array[58] = 6613
array[59] = 6845
array[60] = 7081
array[61] = 7321
array[62] = 7565
array[63] = 7813
array[64] = 8065
array[65] = 8321
array[66] = 8581
array[67] = 8845
array[68] = 9113
array[69] = 9385
array[70] = 9661
array[71] = 9941
array[72] = 10225
array[73] = 10513
array[74] = 10805
array[75] = 11101
array[76] = 11401
array[77] = 11705
array[78] = 12013
array[79] = 12325
array[80] = 12641
array[81] = 12961
array[82] = 13285
array[83] = 13613
array[84] = 13945
array[85] = 14281
array[86] = 14621
array[87] = 14965
array[88] = 15313
array[89] = 15665
array[90] = 16021
array[91] = 16381
array[92] = 16745
array[93] = 17113
array[94] = 17485
array[95] = 17861
array[96] = 18241
array[97] = 18625
array[98] = 19013
array[99] = 19405
array[100] = 19801
print(array[n])


n = int(input())
s = 0
if n == 1:
	s = 1
if n == 2:
	s = 5
if n > 2:
	s = n * n + (n - 1) * (n - 1)
print(s)


def romb(n):
	dp = [] + [0] * (n + 1)
	dp[0] = 0
	if n == 1:
		return 1
	if n == 2:
		return 5
	if n == 3:
		return 13
	dp[1] = 1
	dp[2] = 5
	dp[3] = 13
	k = 2
	for i in range(4, n + 1):
		dp[i] = (dp[i - 1] - dp[i - 2]) * 2 + dp[i - 1] - k * 2
		k += 2
	return dp[n]
n = int(input())
print(romb(n))


l = []
for i in range(1, 101):
	if i == 1:
		l.append(1)
	elif i == 2:
		l.append(5)
	else:
		ans = (i - 2) * 4 + 4 + l[i - 2]
		l.append(ans)
n = int(input())
print(l[n - 1])


n = int(input())

def method(n):
	if n == 1:
		return 1
	else:
		return 4 * (n - 1) + method(n - 1)
print(method(n))


a = int(input())
b = 1
for i in range(4, a * 4, 4):
	b = b + i
print(b)


n = int(input())
print(f'{2 * n * (n - 1) + 1}')


def main():
	n = int(input())
	a = [x for x in range(1, 300, 2)]
	x = a[n - 1]
	ans = x
	x -= 2
	while x > 0:
		ans += 2 * x
		x -= 2
	print(ans)
main()


n = int(input())
a = n - 1
p = a * a
print(n * n + p)


n = int(input())
num = 1
for i in range(2, n + 1):
	num += 4 * (i - 1)
print(num)


n = int(input())
if n == 1:
	print(1)
else:
	c = 1
	d = 4
	for i in range(1, n):
		c += d
		d += 4
	print(c)


n = int(input())
k = 2 * n - 1
a = int((k - 1) / 2 * (n - 1))
s = 2 * a + k
print(s)


def main(args):
	n = int(input())
	a = 1
	for i in range(n):
		a += i * 4
	print(a)
import sys
sys.exit(main(sys.argv))


n = int(input())
print(str(2 * n * n - 2 * n + 1))


num = int(input())
s = 0
for i in range(num):
	s += 2 * i + 1
for i in range(num - 1, 0, -1):
	s += 2 * i - 1
print(s)


n = int(input())
(ct, t) = (1, 0)
for k in range(n):
	ct += t
	t += 4
print(ct)


n = int(input())
tk = 1
rz = 4
for i in range(n - 1):
	tk += rz
	rz += 4
print(tk)


def x(n):
	if n == 1:
		return 1
	else:
		return x(n - 1) + 4 * (n - 1)
print(x(int(input())))


n = int(input())

def rec(a):
	if a == 1:
		return 1
	else:
		return 4 * (a - 1) + rec(a - 1)
print(rec(n))


n = int(input())
a = n * n
b = (n - 1) * (n - 1)
s = a + b
print(s)


def solve():
	n = int(input())
	T = [0, 1]
	k = 4
	for i in range(2, n + 1):
		T.append(T[-1] + k)
		k += 4
	print(T[n])
solve()


def foo(N):
	return (N + 1) * N / 2 + N * (N - 1) + (N - 1) * (N - 2) / 2
a = int(input())
print(int(foo(a)))


dp = [0] * 101
dp[1] = 1
for i in range(2, 101):
	dp[i] = dp[i - 1] + 4 * (i - 1)
N = int(input())
print(dp[N])


def area(num):
	if num > 1:
		return 4 * (num - 1) + area(num - 1)
	else:
		return 1
n = int(input())
print(area(n))