You have a plate and you want to add some gilding to it. The plate is a rectangle that we split into $w\times h$ cells. There should be $k$ gilded rings, the first one should go along the edge of the plate, the second one — $2$ cells away from the edge and so on. Each ring has a width of $1$ cell. Formally, the $i$-th of these rings should consist of all bordering cells on the inner rectangle of size $(w - 4(i - 1))\times(h - 4(i - 1))$.

 [Image] The picture corresponds to the third example. 

Your task is to compute the number of cells to be gilded.


-----Input-----

The only line contains three integers $w$, $h$ and $k$ ($3 \le w, h \le 100$, $1 \le k \le \left\lfloor \frac{min(n, m) + 1}{4}\right\rfloor$, where $\lfloor x \rfloor$ denotes the number $x$ rounded down) — the number of rows, columns and the number of rings, respectively.


-----Output-----

Print a single positive integer — the number of cells to be gilded.


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

Output
8

Input
7 9 1

Output
28

Input
7 9 2

Output
40



-----Note-----

The first example is shown on the picture below.

 [Image] 

The second example is shown on the picture below.

 [Image] 

The third example is shown in the problem description.

Difficulty: EASY

Solutions:
(w, h, k) = [int(i) for i in input().split()]
s = 0
for i in range(k):
	s = s + 2 * w + 2 * h - 4
	w = w - 4
	h = h - 4
print(s)


(w, h, k) = map(int, input().split())
if k == 0:
	print(0)
	exit()
i = 0
while k > 0:
	g = w * 2 + (h - 2) * 2
	w = w - 4
	h = h - 4
	k = k - 1
	i = g + i
print(i)


def g(f):
	linein = f + ' '
	k = -1
	n = 0
	minus = False
	a = [0, 0, 0]
	for i in linein:
		k += 1
		if i != ' ':
			if linein[k + 1] == ' ':
				a[n] = a[n] * 10 + int(i)
				if minus:
					a[n] *= -1
					minus = False
				n += 1
			elif i == '-':
				minus = True
			else:
				a[n] = a[n] * 10 + int(i)
	n = 0
	if a[1] != 1:
		for i in range(a[2]):
			n += (a[0] - 4 * i) * (a[1] - 4 * i) - (a[0] - 2 - 4 * i) * (a[1] - 2 - 4 * i)
	else:
		n = a[0]
	return n
print(g(input()))


(w, h, k) = list(map(int, input().split()))
x = (w + h) * 2 - 4
w1 = w
h1 = h
while k > 1:
	w1 -= 4
	h1 -= 4
	x += (w1 + h1) * 2 - 4
	k -= 1
print(x)


(m, n, k) = map(int, input().split())
s = 0
for i in range(k):
	s += 2 * m
	s += 2 * n - 4
	m -= 4
	n -= 4
print(s)


(w, h, k) = map(int, input().split())
ans = 0
i = 0
while i < k:
	ans += 2 * w
	w -= 4
	i += 1
h -= 2
i = 0
while i < k:
	ans += 2 * h
	h -= 4
	i += 1
print(ans)


(n, m, k) = map(int, input().split())
kol = 0
otst = 0
for i in range(k):
	if n == 1:
		kol += m
	elif m == 1:
		kol += n
	else:
		kol += 2 * n + 2 * m - 4
	n -= 4
	m -= 4
print(kol)


(w, h, k) = map(int, input().split())
cnt = 0
while k > 0:
	cnt += 2 * h + 2 * w - 4
	k -= 1
	h -= 4
	w -= 4
print(cnt)


(w, h, k) = map(int, input().split())
ans = 0
for i in range(k):
	ans += (w + h) * 2 - 4
	w -= 4
	h -= 4
print(ans)


(w, h, k) = map(int, input().split())
c = 0
for i in range(1, k + 1):
	c += (w - 4 * (i - 1) - 2) * 2 + (h - 4 * (i - 1) - 2) * 2 + 4
print(c)


(w, h, k) = map(int, input().split())
sm = w * 2 + h * 2 - 4
j = 2
for i in range(k - 1):
	sm += (w - j * 2) * 2 + (h - j * 2) * 2 - 4
	j += 2
print(sm)


n = list(map(int, input().split()))
w = n[0]
h = n[1]
k = n[2]
sum = 0
for i in range(1, k + 1):
	sum += 2 * (w + h - 8 * (i - 1)) - 4
print(sum)


(a, b, c) = map(int, input().split())
z = 0
for i in range(c):
	z += a * b - (a - 2) * (b - 2)
	a = a - 4
	b -= 4
print(z)


(w, h, k) = map(int, input().split())
ans = 0
for i in range(k):
	if k == 1:
		ans += h * 2 + (w - 2) * 2
	else:
		ans += (h * 2 + (w - 2) * 2 + (h - 4 * (k - 1)) * 2 + (w - 4 * (k - 1) - 2) * 2) // 2
print(ans)


def zadanie1(w, h, k):
	summarise = 0
	i = 2
	while k != 0:
		if i % 2 == 0:
			summarise += (w + h) * 2 - 4
			w -= 2
			k -= 1
			h -= 2
			i += 1
		else:
			i += 1
			w -= 2
			h -= 2
	return summarise
(w, h, k) = map(int, input().split())
summarise = 0
print(zadanie1(w, h, k))


(w, h, k) = map(int, input().split())
count = 0
f = k
while k != 0:
	x = 2 * w + 2 * h
	count = count + x
	w = w - 4
	h = h - 4
	k = k - 1
print(count - 4 * f)


def num():
	return map(int, input().split())
(w, h, k) = num()
f = 0
for i in range(k):
	if w != 1 and h != 1:
		f += (w + h - 2) * 2
		w -= 4
		h -= 4
	else:
		f += w * h
print(f)


(w, h, k) = map(int, input().split())
print(sum((2 * (w + h - 8 * i - 2) for i in range(k))))


x = list(map(int, input().split(' ')))
a = 0
b = x[0]
c = x[1]
for i in range(x[2]):
	a += 2 * (b + c) - 4
	b -= 4
	c -= 4
print(a)


f = lambda : map(int, input().split())
(w, h, k) = f()
c = 0
while k:
	c += (w + h) * 2 - 4
	w -= 4
	h -= 4
	k -= 1
print(c)


(a, b, c) = map(int, input().split())
s = 0
i = 0
while i < c:
	if a <= 0 or b <= 0:
		break
	elif a == 1 or b == 1:
		s += a * b
	else:
		s += (a + b) * 2 - 4
	a -= 4
	b -= 4
	i += 1
print(s)


(a, b, c) = map(int, input().split())
per = 0
for i in range(c):
	per += a + a + b + b - 4
	a -= 4
	b -= 4
print(per)


import sys

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

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

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

def get_list():
	return list(map(int, sys.stdin.readline().strip().split()))
(w, h, k) = get_ints()
check = True
ans = 0
count = 0
while check:
	ans += w * 2 + (h - 2) * 2
	w -= 4
	h -= 4
	count += 1
	if count == k:
		check = False
print(ans)


(ln, h, k) = map(int, input().split())
kol = 0
while k != 0 and ln > 0 and (k > 0):
	kol += 2 * h + 2 * (ln - 2)
	ln -= 4
	h -= 4
	k -= 1
print(kol)


w = input().split(' ')
n = int(w[0])
m = int(w[1])
k = int(w[2])
sm = 0
while k > 0:
	sm += 2 * (n + m - 2)
	n -= 4
	m -= 4
	k -= 1
print(sm)


(n, m, k) = map(int, input().split())
s = 0
for i in range(k):
	if n > 1 and m > 1:
		sloy = max(2 * (n - 1) + 2 * (m - 1), 1)
	else:
		sloy = n * m
	s += sloy
	if n > 4 and m > 4:
		n -= 4
		m -= 4
	else:
		n -= 2
		m -= 2
print(s)


(w, h, k) = map(int, input().split())
q = 0
for i in range(1, k + 1):
	w1 = w - 4 * (i - 1)
	h1 = h - 4 * (i - 1)
	q += 2 * (w1 - 2) + 2 * h1
print(q)


(w, h, k) = map(int, input().split())
x = 0
for i in range(k):
	x += (w + h - i * 8) * 2 - 4
print(x)


a = list(map(int, input().split()))
f = 0
for i in range(a[2]):
	f += 2 * (a[0] - 1 - 4 * i) + 2 * (a[1] - 1 - 4 * i)
print(f)


p = input().split()
w = int(p[0])
h = int(p[1])
k = int(p[2])
o = 0
cnt = 0
for i in range(k):
	o += w * 2 + h * 2 - 4
	w -= 4
	h -= 4
print(o)


(n, m, k) = map(int, input().split())
l = 0
sm = 0
for i in range(k):
	q = n * m
	w = (n - 2) * (m - 2)
	sm += q - w
	n -= 4
	m -= 4
print(sm)


a = lambda w, h: w * h - (w - 2) * (h - 2)
(w, h, k) = map(int, input().split())
c = 0
for i in range(k):
	c += a(w, h)
	w -= 4
	h -= 4
print(c)


(w, h, k) = map(int, input().split())
f = 0
n = 0
for i in range(k):
	n += 2 * (w - f) + 2 * (h - f) - 4
	f += 4
print(n)


a = list(map(int, input().split()))
w = a[0]
h = a[1]
k = a[2]
result = w + (h - 1) + (w - 1) + (h - 2)
for x in range(k - 1):
	w -= 4
	h -= 4
	result += w + (h - 1) + (w - 1) + (h - 2)
print(result)


(w, h, k) = map(int, input().split())
a = 0
for i in range(k):
	w0 = w - 4 * i
	h0 = h - 4 * i
	a += max(0, 2 * (w0 + h0) - 4)
print(a)


(w, h, k) = input().split()
(w, h, k) = (int(w), int(h), int(k))
count = 0
for i in range(k):
	if w > 1 and h > 1:
		count += (w + h - 2) * 2
		if w > 3 and h > 3:
			w = w - 4
			h = h - 4
		else:
			break
	elif w == 1:
		count += h
	else:
		count += w
print(count)


inpt = list(map(int, input().split()))
h = inpt[0]
w = inpt[1]
k = inpt[2]
p = (h + w) * 2 - 4
k -= 1
otv = p
while min(w, h) > 2 and k > 0:
	h -= 4
	w -= 4
	p = (h + w) * 2 - 4
	otv += p
	k -= 1
print(otv)


(a, b, c) = map(int, input().split())
cnt = 0
for i in range(1, c + 1):
	cnt += 2 * (a - 4 * (i - 1) + (b - 4 * (i - 1)))
print(cnt - 4 * c)


q = input()
a = []
for i in q.split():
	a.append(i)
w = int(a[0])
h = int(a[1])
k = int(a[2])

def gold_cells(x, y):
	if x > 1 and y > 1:
		return 2 * (x + y) - 4
	elif x == 1 or y == 1:
		return x * y
pozolota = 0
num_rings = 0
while (w > 0 and h > 0) and num_rings < k:
	pozolota += gold_cells(w, h)
	w -= 4
	h -= 4
	num_rings += 1
print(pozolota)


(w, h, k) = map(int, input().split(' '))
ans = 0
for i in range(k):
	cw = w - i * 4
	ch = h - i * 4
	cells = cw * 2 + ch * 2 - 4
	ans += cells
print(ans)


st = input().split()
(w, h, k) = (int(st[0]), int(st[1]), int(st[2]))
h += 2
w += 2
i = 0
flag = 0
answ = 0
while i != k and (h > 0 and w > 0):
	h -= 2
	w -= 2
	flag += 1
	if flag % 2 == 0:
		continue
	else:
		i += 1
		answ = answ + (h + w - 2) * 2
print(answ)


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


from sys import stdin
input = stdin.readline
(w, h, k) = map(int, input().split())
const = 4
s = 0
while k != 0:
	s += 2 * h + 2 * w - const
	h -= 4
	w -= 4
	k -= 1
print(s)


(a, s) = ([int(i) for i in input().split()], 0)
for i in range(0, a[2]):
	s += 2 * (a[0] + a[1]) - 16 * i - 4
print(s)


(x, y, k) = map(int, input().split())
ka = 0
for i in range(k):
	ka += 2 * x + 2 * y - 4
	x -= 4
	y -= 4
print(ka)


(w, h, k) = map(int, input().split())
cnt = 0
for i in range(k):
	rad_x = w - 4 * i
	rad_y = h - 4 * i
	rad_in_x = w - 4 * i - 2
	rad_in_y = h - 4 * i - 2
	cnt += rad_x * rad_y - rad_in_x * rad_in_y
print(cnt)


t = input()
a = t.split()
count = 0
for i in range(int(a[2])):
	count += 2 * (int(a[0]) + int(a[1])) - 4
	a[0] = str(int(a[0]) - 4)
	a[1] = str(int(a[1]) - 4)
print(count)


(w, h, k) = map(int, input().split())
sum = 0
c = 0
while c != k:
	sum += (w - 1 + (h - 1)) * 2
	c += 1
	w -= 4
	h -= 4
print(sum)


(w, h, k) = map(int, input().split())
num = 0
for i in range(k):
	num += (h + w) * 2 - 4
	w -= 4
	h -= 4
	if w <= 1 or h <= 1:
		break
print(num)


(w, h, k) = list(map(int, input().split()))
count = 0
for i in range(k):
	count += 2 * (w + h - 2 - 8 * i)
print(count)


IL = lambda : list(map(int, input().split()))
(w, h, k) = IL()
print(sum(((w + h - 2) * 2 - i * 16 for i in range(k))))


d = tuple(map(int, input().split()))
w = d[0]
h = d[1]
k = d[2]
Nk = w + w + h + h - 4
g = [0 for i in range(k)]
if k > 1:
	for i in range(1, k):
		Nk += (w - 4 * i + (h - 4 * i)) * 2 - 4
print(Nk)


(w, h, num_of_circles) = [int(s) for s in input().split()]
answer = 0
z = 0
for i in range(num_of_circles):
	answer += (w + z + h + z) * 2 - 4
	z -= 4
print(answer)


(a, b, c) = map(int, input().split())
i = 0
value = 0
while i < c:
	value += a + b - 4 + a + b
	a -= 4
	b -= 4
	i += 1
print(value)


import math

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

def solve():
	(x, y, n) = input_ints()
	ans = 0
	for i in range(n):
		ans += 2 * (x + y) - 4
		x -= 4
		y -= 4
	print(ans)
solve()


[w, h, k] = [int(x) for x in input().split()]
c = 0
for i in range(0, k):
	c += 2 * (w - 4 * i) + 2 * (h - 4 * i) - 4
print(c)


(w, h, k) = [int(i) for i in input().split()]
s = 0
while k >= 1 and w > 0 and (h > 0):
	x = 2 * w + 2 * h - 4
	w = w - 4
	h = h - 4
	s = s + x
	k = k - 1
print(s)


(a, b, c) = input().split()
a = int(a)
b = int(b)
n = 0
for i in range(int(c)):
	j = (a + b - 2) * 2
	if j == 0:
		n += 1
	else:
		n += j
	a -= 4
	b -= 4
print(n)


(w, h, k) = map(int, input().split())
p = 0
for i in range(k):
	o = (w - 4 * i) * (h - 4 * i) - (w - 4 * i - 2) * (h - 4 * i - 2)
	p += o
print(p)


(n, m, h) = map(int, input().split())
s = 0
for i in range(1, h + 1):
	a = n - 4 * (i - 1)
	b = m - 4 * (i - 1)
	s += 2 * (a + b) - 4
print(s)


(w, h, k) = [int(x) for x in input().split()]
cnt = 0
for i in range(1, k + 1):
	a = w - 4 * (i - 1)
	b = h - 4 * (i - 1)
	cnt += 2 * a + 2 * b
print(cnt - 4 * k)


i = input().split()
a = int(i[0])
b = int(i[1])
c = int(i[2])
i = 1
rez = 0
g = 0
plo = a * b
while i <= c:
	g = a + b - 1 + a - 1 + b - 2
	rez = rez + g
	a -= 4
	b -= 4
	i += 1
print(rez)


(w, h, k) = map(int, input().split())
cnt = 0
for _ in range(k):
	cnt += 2 * (w + h) - 4
	w -= 4
	h -= 4
print(cnt)


(w, h, k) = map(int, input().strip().split())
summ = 0
for i in range(1, k + 1):
	summ += (w - 4 * (i - 1)) * 2 + (h - 4 * (i - 1)) * 2 - 4
print(summ)


a = []
text = input().split()
h = int(text[0])
w = int(text[1])
kol = int(text[2])
result = 0
for i in range(1, kol + 1):
	result += (w - 2 - 4 * (i - 1)) * 2 + (h - 4 * (i - 1)) * 2
print(result)


vvod = input().split()
(w, h) = (int(vvod[0]), int(vvod[1]))
res = 0
for a in range(int(vvod[2])):
	res += 2 * (w + h - 2)
	w -= 4
	h -= 4
print(res)


(n, m, k) = map(int, input().split())
print(k * (2 * (n + m - 2) - 8 * (k - 1)))


(w, h, k) = map(int, input().split())
s = 0
for i in range(k):
	hi = h - 4 * i
	wi = w - 4 * i
	s += 2 * (hi + wi) - 4
print(s)


(a, b, c) = map(int, input().split())
out = 0
for i in range(1, c + 1):
	wid = a - 4 * (i - 1)
	heig = b - 4 * (i - 1)
	out += wid * 2 + (heig - 2) * 2
print(out)


(w, h, k) = list(map(int, input().split()))

def t_a(a, b, c):
	ww = 0
	hh = 0
	for i in range(1, c + 1):
		ww += a - 4 * (i - 1)
		hh += b - 4 * (i - 1) - 2
	return 2 * (ww + hh)
print(t_a(w, h, k))


(w, h, k) = map(int, input().split())
plate = [[0 for i in range(w)] for g in range(h)]
n = 0
ans = 0
for l in range(1, k + 1):
	for v in range(n, w - n):
		plate[n][v] = 1
		ans += 1
	for g in range(n, w - n):
		plate[h - 1][g] = 1
		ans += 1
	for m in range(n, h - n):
		plate[m][n] = 1
		ans += 1
	for u in range(n, h - n):
		plate[u][w - 1] = 1
		ans += 1
	n += 2
print(ans - 4 * k)


(n, m, k) = map(int, input().split())
ans = 0
while k > 0 and n > 0 and (m > 0):
	ans += (n + m - 2) * 2
	n -= 4
	m -= 4
	k -= 1
print(ans)


h = list(map(int, input().split()))
num = 0
for i in range(h[2]):
	num += (h[0] + h[1] - 2) * 2
	h[0] -= 4
	h[1] -= 4
print(num)


(w, h, k) = map(int, input().split())
r = 0
for _ in [0] * k:
	r += (w + h << 1) - 4
	w -= 4
	h -= 4
print(r)


(a, b, c) = map(int, input().split())
print(c * (2 * (a + b - (c - 1) * 4 - 2)))


(w, h, k) = map(int, input().split())
cnt = 0
num = 0
for i in range(k):
	num = num + 2 * (w - cnt + h - cnt) - 4
	cnt = cnt + 4
print(num)


(w, h, k) = map(int, input().split())
count = 0
while h >= 3 and w >= 1 and (k > 0):
	count += 2 * h + 2 * (w - 2)
	h -= 4
	w -= 4
	k -= 1
print(count)


data = list(map(int, input().split()))
w = data[0]
h = data[1]
k = data[2]
print(2 * k * (w + h) - 8 * k * (k - 1) - 4 * k)


(w, h, k) = map(int, input().split())
i = 0
ans = 0
while i < k:
	length = w - i * 2 * 2
	width = h - i * 2 * 2
	total = (length + width) * 2 - 4
	ans += total
	i += 1
print(ans)


(w, h, k) = map(int, input().split())
c = 0
for i in range(0, 2 * k):
	if i % 2 == 0:
		c += (w - 2 * i) * (h - 2 * i)
	else:
		c -= (w - 2 * i) * (h - 2 * i)
print(c)


(w, h, k) = map(int, input().split())
p = 0
for i in range(k):
	wu = w - 4 * i
	hu = h - 4 * i
	p += 2 * (wu + hu) - 4
print(p)


inp = input().split(' ')
w = int(inp[0])
h = int(inp[1])
k = int(inp[2])
answer = 0
for i in range(k):
	answer = answer + 2 * (w + h) - 4
	w -= 4
	h -= 4
print(answer)


H = list(map(int, input().split()))
w = H[0]
h = H[1]
k = H[2]
ans = 0
while k != 0:
	k -= 1
	ans += 2 * w + 2 * h - 4
	w -= 4
	h -= 4
print(ans)


def s(a, b):
	return a * b - (a - 2) * (b - 2)
(w, h, k) = map(int, input().split())
cnt = 0
for i in range(1, k + 1):
	cnt += s(w - 4 * (i - 1), h - 4 * (i - 1))
print(cnt)


l = list(map(int, input().split()))
counter = 0
for i in range(l[2]):
	counter += l[0] * 2 + (l[1] * 2 - 4)
	l[0] -= 4
	l[1] -= 4
print(counter)


(w, h, k) = list(map(int, input().split()))
print(2 * k * (w + h + 2 - 4 * k))


n = list(map(int, input().split()))
count = 0
for i in range(n[2]):
	count = count + 2 * n[0] + 2 * (n[1] - 2)
	n[0] -= 4
	n[1] -= 4
print(count)


x = 0
(a, b, k) = input().split()
(a, b, k) = (int(a), int(b), int(k))
while k > 0:
	x += a * 2 + b * 2 - 4
	k -= 1
	b -= 4
	a -= 4
print(x)


(w, h, k) = map(int, input().split())
out = 0
i = 1
while i <= k:
	if w - 4 * (i - 1) == 1 and h - 4 * (i - 1) == 1:
		out += 1
	elif w - 4 * (i - 1) == 1 or h - 4 * (i - 1) == 1:
		out += max(w - 4 * (i - 1), h - 4 * (i - 1))
	else:
		out += 2 * (w + h - 8 * (i - 1)) - 4
	i += 1
print(out)


(n, m, k) = map(int, input().split())

def calc(x, y):
	if min(x, y) == 1:
		return max(x, y)
	return (x + y) * 2 - 4
print(sum((calc(n - 4 * i, m - 4 * i) for i in range(k))))


(m, n, k) = map(int, input().split())
total = 0
h = 0
for i in range(k):
	total += 2 * (m - 4 * i) + 2 * (n - 4 * i - 2)
print(total)


(w, h, k) = map(int, input().split())
i = 0
c = 0
for g in range(0, k):
	a = w - 2 * i
	b = h - 2 * i
	d = 2 * (a + b) - 4
	i = i + 2
	c = c + d
print(c)


def GoldenPlate(w, h, k):
	res = 0
	for i in range(k):
		res = res + (w - 1) * 2 + (h - 1) * 2
		w = w - 4
		h = h - 4
	return res
s = [int(n) for n in input().split()]
print(GoldenPlate(s[0], s[1], s[2]))


from sys import stdin, stdout, exit as sys_ret
(f_input, f_print, f_flush) = (stdin.readline, stdout.write, stdout.flush)
(width, height, k) = map(int, f_input().split())
total = 0
while k:
	total += 2 * (width + height) - 4
	(width, height) = (width - 4, height - 4)
	k -= 1
f_print(str(total))


(w, h, k) = list(map(int, input().strip().split()))
total = 0
for i in range(1, k + 1):
	ancho = w - 4 * (i - 1)
	alto = h - 4 * (i - 1)
	total += 2 * (ancho + alto) - 4
print(total)


(m, n, k) = map(int, input().split()[:3])
if m < n:
	(m, n) = (n, m)
if k == 1:
	print(2 * m + 2 * (n - 2))
else:
	c = 0
	while k > 0:
		c += 2 * m + 2 * (n - 2)
		k -= 1
		m -= 4
		n -= 4
	print(c)


(w, h, k) = [int(x) for x in input().split()]
ret = 0
for _ in range(k):
	ret += (w << 1) + (h - 2 << 1)
	w -= 4
	h -= 4
print(ret)


(w, h, k) = map(int, input().split())
print(2 * (w + h) * k - 8 * k * k + 4 * k)


s = input()
(w, h, k) = s.split(' ')
z = int(w)
h = int(h)
c = int(k)
p = 0
for i in range(c):
	p += (z + h - 2) * 2
	z -= 4
	h -= 4
print(p)


(w, h, k) = map(int, input().split())
cnt = 0
cnt1 = 0
for i in range(1, max(h, w) // 2 + 1):
	if i % 2 != 0 and cnt1 < k:
		cnt1 += 1
		cnt += 2 * (h - i) + 2 * (w - i)
	h -= 1
	w -= 1
print(cnt)


import math

def count_squares(w, h):
	return 2 * (w + h - 2)
(w, h, k) = input().split()
w = int(w)
h = int(h)
k = int(k)
summ = 0
for i in range(k):
	summ += count_squares(w - 4 * i, h - 4 * i)
print(summ)


(n, m, c) = map(int, input().split())
sum = 0
for i in range(1, c + 1):
	if c == 1:
		sum = n * 2 + (m - 2) * 2
		continue
	sum += (n - 4 * (i - 1)) * 2 + (m - 4 * (i - 1) - 2) * 2
print(sum)


st = input().split()
(w, h) = (int(st[0]), int(st[1]))
klet = 0
for i in range(int(st[-1])):
	klet += (w - 2) * 2 + h * 2
	w -= 4
	h -= 4
print(klet)


def countGlides(row, col):
	return 2 * row + 2 * col - 4
(row, col, rings) = map(int, input().split(' '))
glides = 0
for i in range(0, rings):
	glides += countGlides(row - 4 * i, col - 4 * i)
print(glides)


(w, h, k) = list(map(int, input().split()))
summ = 0
for i in range(k):
	summ += 2 * (w - 4 * i) + 2 * (h - 4 * i) - 4
print(summ)


(height, width, rows) = list(map(int, input().split()))
squares = 0
for i in range(rows):
	squares += (width + height) * 2 - 4
	width -= 4
	height -= 4
print(squares)


import sys

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

def mint():
	return int(minp())

def mints():
	return map(int, minp().split())
(w, h, k) = mints()
r = 0
for i in range(k):
	r += 2 * w + (h - 2) * 2
	w -= 4
	h -= 4
print(r)


d = input().split()
w = int(d[0])
h = int(d[1])
k = int(d[2])
a = 0
kol = 0
for i in range(1, k + 1):
	kol += 2 * (h - a) + 2 * (w - a - 2)
	a += 4
print(kol)


(w, h, k) = [int(elt) for elt in input().split(' ')]
res = 0
x = 0
for i in range(k):
	res += (w - x) * 2 + (h - x - 2) * 2
	x += 4
print(res)


x = [int(i) for i in input().split()]
(w, h, k, count) = (x[0], x[1], x[2], 0)
for i in range(k):
	count += 2 * (w - 4 * i + h - 4 * i - 2)
print(count)


a = input() + ' '
(b, g) = ('', 0)
A = []
for j in range(len(a)):
	if a[j] == ' ':
		A.append(int(b))
		b = ''
	else:
		b += a[j]
for i in range(A[2]):
	n = A[0] - 4 * i
	m = A[1] - 4 * i
	g += 2 * n + 2 * m - 4
print(g)


(h, w, k) = map(int, input().split())
noc = 0
for x in range(k):
	noc += 2 * (w - 4 * x) + 2 * (h - 2 - 4 * x)
print(noc)


(w, h, k) = list(map(int, input().split()))
n = 0
m = 0
while h > 2 and w > 2 and (n != k):
	m += 2 * h + 2 * (w - 2)
	h = h - 4
	w = w - 4
	n += 1
print(m)


def main():
	(w, h, k) = map(int, input().split())
	twice_rect_s = k ** 2 - k
	res = 2 * k * (w + h) - 8 * twice_rect_s - 4 * k
	print(int(res))
main()


l = list(map(int, input().split()))
(w, h, k) = (l[0], l[1], l[2])
n = 0
while k:
	n = n + w * 2 + (h - 2) * 2
	w = w - 4
	h = h - 4
	k = k - 1
print(n)


(a, b, k) = [int(i) for i in input().split(' ')]
total = 0
for i in range(k):
	total += 2 * (a - 4 * i) + 2 * (b - 4 * i) - 4
print(total)


(w, h, k) = map(int, input().split())
gil = 0
(wC, hC) = (w, h)
for i in range(k):
	gil += (w - 4 * i + (h - 4 * i)) * 2 - 4
print(gil)


(w, h, k) = map(int, input().split())
r = 0
for x in range(k):
	r = r + (w - 8 * x + h - 2) * 2
print(r)


(w, h, k) = map(int, input().split())
plate = []
for i in range(w):
	line = []
	for j in range(h):
		line.append(0)
	plate.append(line)
(l, r) = (0, len(plate[0]) - 1)
top = 0
down = len(plate) - 1
for i in range(k):
	for j in range(l, r + 1):
		plate[top][j] = 1
	for j in range(l, r + 1):
		plate[down][j] = 1
	for j in range(top, down):
		plate[j][l] = 1
		plate[j][r] = 1
	(l, r) = (l + 2, r - 2)
	(top, down) = (top + 2, down - 2)
k = 0
for i in plate:
	k += i.count(1)
print(k)


(w, h, k) = map(int, input().split())
(s, c) = (0, 2 * (w + h - 2))
for _ in range(k):
	s += c
	c -= 16
print(s)


import math
(h, w, k) = map(int, input().split())
ans = 0
while h > 0 and w > 0 and (k > 0):
	ans += w * 2 + (h - 2) * 2
	h -= 4
	w -= 4
	k -= 1
print(ans)


from math import ceil
(w, h, k) = [int(s) for s in input().split()]
ans = (w + h - 2) * 2
k -= 1
while w > 4 and h > 4 and (k != 0):
	ans += (w - 4 + h - 4 - 2) * 2
	w -= 4
	h -= 4
	k -= 1
print(ans)


(n, m, k) = map(int, input().split())
a = []
res = 0
for i in range(k):
	res += 2 * n + 2 * m - 4
	n -= 4
	m -= 4
print(res)


(h, w, k) = map(int, input().split())
base = 2 * h + 2 * (w - 2)
for i in range(k - 1):
	h -= 4
	w -= 4
	base += 2 * h + 2 * (w - 2)
print(base)


x = list(map(int, input().split()))
v = 0
v += 2 * (x[0] + x[1]) - 4
for i in range(1, x[2]):
	v += 2 * (x[0] - 4 + x[1] - 4) - 4
	x[0] = x[0] - 4
	x[1] = x[1] - 4
print(v)


def f(n, m, k):
	if k == 0:
		return 0
	return f(n - 4, m - 4, k - 1) + 2 * (n + m - 2)
(n, m, k) = map(int, input().split())
print(f(n, m, k))


(m, n, k) = map(int, input().split())
ans = 0
for I in range(k):
	ans += (m - 4 * I) * 2 + 2 * (n - 4 * I) - 4
print(ans)


(w, h, k) = list(map(int, input().split()))
z = 0
for i in range(k):
	z += (w - 1 - 4 * i) * 2 + (h - 1 - 4 * i) * 2
print(z)


def main():
	(h, w, k) = map(int, input().split())
	ans = 0
	for i in range(k):
		t1 = w - 4 * i
		t2 = h - 4 * i
		if t1 == 1:
			ans += t2
		elif t2 == 1:
			ans += t1
		else:
			ans += t1 * 2 + t2 * 2 - 4
	print(ans)
main()


(a, b, k) = map(int, input().split())
i = 1
z = []
while k > 0:
	t = a * b
	a = a - 2
	b = b - 2
	s = t - a * b
	z.append(s)
	k = k - 1
	a = a - 2
	b = b - 2
print(sum(z))


w = list(map(int, input().split()))
sum = 0
for i in range(w[2]):
	if w[0] != 1 or w[1] != 1:
		sum += 2 * w[0] + 2 * w[1] - 4
	else:
		sum += max(w[0], w[1])
	w[0] = w[0] - 4
	w[1] = w[1] - 4
print(sum)


(w, h, k) = map(int, input().split(' '))
a = (2 * (h + w) - 8 * (k - 1) - 4) * k
print(a)


from math import *
from cmath import *
from itertools import *
from decimal import *
from fractions import *
from sys import *
from types import CodeType, new_class
(w, h, k) = map(int, input().split())
ans = 0
for x in range(k):
	ans += (w + h) * 2 - 4
	w -= 4
	h -= 4
print(ans)


(w, h, k) = map(int, input().split())
p = 0
for i in range(1, k + 1):
	m = w - 4 * (i - 1)
	n = h - 4 * (i - 1)
	p += m * 2 + n * 2 - 4
print(p)


(n, m, k) = map(int, input().split())
print(sum(((n - 4 * i) * 2 + (m - 4 * i) * 2 - 4 for i in range(k))))


(w, h, k) = map(int, input().split())
ans = 0

def calc_ans(w, h):
	cur = 0
	all_points = set()
	for i in range(w):
		all_points.add((i, 0))
		all_points.add((i, h - 1))
	for j in range(h):
		all_points.add((0, j))
		all_points.add((w - 1, j))
	return len(all_points)
for i in range(k):
	ans += calc_ans(w, h)
	w -= 4
	h -= 4
	if w < 0 or h < 0:
		break
print(ans)


(w, h, k) = map(int, input().split())
su = 0
while k:
	su += int(w * h)
	w -= 2
	h -= 2
	su -= int(w * h)
	w -= 2
	h -= 2
	k -= 1
print(su)


(w, h, k) = input().split()
w = int(w)
h = int(h)
k = int(k)
sum = 0
c = 0
a = 0
for i in range(1, k + 1):
	c += (w - a) * 2 + (h - a - 2) * 2
	a += 4
print(c)


(n, m, k) = map(int, input().split())
s = 0
while k != 0:
	if m > n:
		(n, m) = (m, n)
	s += (n - 2) * 2 + m * 2
	m = m - 4
	n = n - 4
	k -= 1
print(s)


s = list(map(int, input().split()))
rez = 0
for i in range(s[2]):
	rez = rez + s[0] * 2 + s[1] * 2 - 4
	s[0] = s[0] - 4
	s[1] = s[1] - 4
print(rez)


line = input()
nums = line.split()
n = int(nums[0])
m = int(nums[1])
k = int(nums[2])
n -= 2
sum = 0
while k > 0:
	sum = sum + n + m
	n -= 4
	m -= 4
	k -= 1
print(sum * 2)


k = input()
w = ''
h = ''
s = 0
for i in k:
	if i != ' ':
		w = w + i
		k = k[1:]
	else:
		k = k[1:]
		break
for i in k:
	if i != ' ':
		h = h + i
		k = k[1:]
	else:
		k = k[1:]
		break
w = int(w)
h = int(h)
k = int(k)
for i in range(k):
	s = s + (w - i * 4) * (h - i * 4) - (w - i * 4 - 2) * (h - i * 4 - 2)
print(s)


[w, h, k] = map(int, input().split())
res = 0
for i in range(1, k + 1):
	dw = w - 4 * (i - 1)
	dh = h - 4 * (i - 1)
	res += 2 * dw + 2 * dh - 4
	if dw == dh == 1:
		res += 1
print(res)


A = list(str(input()).split(' '))
w = int(A[0])
h = int(A[1])
k = int(A[2])
a = 0
for i in range(k):
	a = a + (h * w - (h - 2) * (w - 2))
	h = h - 4
	w = w - 4
print(a)


def Fingerprint():
	(w, h, k) = list(map(int, input().split()))
	squares = 0
	for i in range(1, 2 * k + 1):
		if i % 2 == 1:
			squares += (w - 2 * (i - 1)) * (h - 2 * (i - 1))
		else:
			squares -= (w - 2 * (i - 1)) * (h - 2 * (i - 1))
	print(squares)
Fingerprint()


(a, b, k) = map(int, input().split())
d = 0
for i in range(0, k):
	d += 2 * (a - 4 * i + b - 4 * i) - 4
print(d)


import sys

def inpu():
	return sys.stdin.readline().strip()
(n, m, k) = [int(i) for i in inpu().split()]
otv = 0
for i in range(k):
	otv += (n - 2) * 2 + m * 2
	n -= 4
	m -= 4
print(otv)


(w, h, k) = map(int, input().split())
ans = 0
for _ in range(k):
	ans += w * h
	w -= 2
	h -= 2
	ans -= w * h
	w -= 2
	h -= 2
print(ans)


def gilded_count(w, h, k):
	gilded = 0
	for i in range(k):
		gilded += 2 * (w - 4 * i) + 2 * (h - 4 * i - 2)
	return gilded
(a, b, c) = map(int, input().split())
print(gilded_count(a, b, c))


(w, h, k) = map(int, input().split())
kol1 = w * 2 + (h - 2) * 2
alll = kol1
if k > 1:
	for i in range(2, k + 1):
		kol1 = kol1 - 16
		alll += kol1
print(alll)


(w, h, k) = map(int, input().split())
summ = 0
for i in range(1, k + 1):
	if (w - 4 * (i - 1)) * (h - 4 * (i - 1)) == 1:
		summ += 1
	else:
		summ += (w - 4 * (i - 1)) * (h - 4 * (i - 1)) - (w - 4 * (i - 0.5)) * (h - 4 * (i - 0.5))
print(int(summ))


(a, b, k) = list(map(int, input().split()))
c = 0
for k in range(k):
	c += (a - 4 * k) * 2 + (b - 4 * k) * 2 - 4
print(c)


a = list(map(int, input().split()))
w = a[0]
h = a[1]
k = a[2]
ans = 0
for i in range(k):
	if w == 1 and h == 1:
		ans += 1
	elif w == 1:
		ans += h
	elif h == 1:
		ans += w
	else:
		ans += 2 * w + 2 * h - 4
	w -= 4
	h -= 4
print(ans)


import sys
import math
import os
import itertools
import string
import heapq
import _collections
from collections import Counter
from collections import defaultdict
from functools import lru_cache
import bisect
import re
import queue
from decimal import *

class Scanner:

	@staticmethod
	def int():
		return int(sys.stdin.readline().rstrip())

	@staticmethod
	def string():
		return sys.stdin.readline().rstrip()

	@staticmethod
	def map_int():
		return [int(x) for x in Scanner.string().split()]

	@staticmethod
	def string_list(n):
		return [input() for i in range(n)]

	@staticmethod
	def int_list_list(n):
		return [Scanner.map_int() for i in range(n)]

	@staticmethod
	def int_cols_list(n):
		return [int(input()) for i in range(n)]

class Math:

	@staticmethod
	def gcd(a, b):
		if b == 0:
			return a
		return Math.gcd(b, a % b)

	@staticmethod
	def lcm(a, b):
		return a * b // Math.gcd(a, b)

	@staticmethod
	def divisor(n):
		res = []
		i = 1
		for i in range(1, int(n ** 0.5) + 1):
			if n % i == 0:
				res.append(i)
				if i != n // i:
					res.append(n // i)
		return res

	@staticmethod
	def round_up(a, b):
		return -(-a // b)

	@staticmethod
	def is_prime(n):
		if n < 2:
			return False
		if n == 2:
			return True
		if n % 2 == 0:
			return False
		d = int(n ** 0.5) + 1
		for i in range(3, d + 1, 2):
			if n % i == 0:
				return False
		return True

def pop_count(x):
	x = x - (x >> 1 & 6148914691236517205)
	x = (x & 3689348814741910323) + (x >> 2 & 3689348814741910323)
	x = x + (x >> 4) & 1085102592571150095
	x = x + (x >> 8)
	x = x + (x >> 16)
	x = x + (x >> 32)
	return x & 127
MOD = int(1000000000.0) + 7
INF = int(1000000000000000.0)

def solve():
	(W, H, K) = Scanner.map_int()
	ans = 0
	for _ in range(K):
		ans += 2 * W + 2 * H - 4
		W -= 4
		H -= 4
	print(ans)

def main():
	solve()
main()


(w, h, k) = map(int, input().split())
(cnt, i) = (0, 1)
(xw, xh) = (100, 100)
for i in range(1, 1 + k):
	(xw, xh) = (w - 4 * (i - 1), h - 4 * (i - 1))
	i += 1
	cnt += 2 * (xw + xh - 2)
print(cnt)


(w, h, k) = input().split(' ')
w = int(w)
h = int(h)
k = int(k)
P = (w + h - 2) * 2
for i in range(1, k):
	w -= 4
	h -= 4
	if h >= 0 and w >= 0:
		P += (w + h - 2) * 2
	i += 1
print(P)


import time

def calculateGildedCells(rows, cols, rings):
	gildedCells = 0
	for x in range(rings):
		gildedCells += calculateRingSize(rows, cols)
		rows = rows - 4
		cols = cols - 4
	return gildedCells

def calculateRingSize(rows, cols):
	height = rows - 2
	return cols * 2 + height * 2

def solve():
	(rows, cols, rings) = [int(x) for x in input().split(' ')]
	print(calculateGildedCells(rows, cols, rings))
solve()


(w, h, k) = map(int, input().split())
t = 1
c = 0
x = w
y = h
for i in range(k):
	a = 2 * (w + h) - 4
	c = c + a
	w = x - 4 * t
	h = y - 4 * t
	t = t + 1
print(c)


(r, c, k) = [int(tmp) for tmp in input().split()]
ans = 0
for i in range(1, k + 1):
	k = r - 4 * (i - 1)
	l = c - 4 * (i - 1)
	ans = ans + 2 * k + 2 * l - 4
print(ans)


P = 0
(n, m, k) = map(int, input().split())
tryn = 1
while tryn <= k:
	P += (n + m - 2) * 2
	n -= 4
	m -= 4
	tryn += 1
print(P)


WTF = list(map(int, input().split()))
COUNTER = 0
TD = WTF[0]
RL = WTF[1] - 2
for _ in range(WTF[2]):
	COUNTER += TD * 2
	COUNTER += RL * 2
	TD -= 4
	RL -= 4
print(COUNTER)


l = list(input().split())
w = int(l[0])
h = int(l[1])
k = int(l[2])
summation = 0
for i in range(k):
	summation += (w - 4 * i) * 2 + (h - 4 * i - 2) * 2
print(summation)


n = [int(i) for i in input().split()]
w = n[0]
h = n[1]
k = n[2]
a = 0
i = 0
while k != 0:
	a += w * 2 + (h - 2) * 2
	k -= 1
	i += 1
	w -= 4
	h -= 4
print(a)


a = [int(i) for i in input().split()]
e = 0
for i in range(a[2]):
	e += (a[0] + a[1]) * 2 - 4
	a[0] -= 4
	a[1] -= 4
print(e)


fin = input()
(w, h, k) = map(int, fin.split(' '))
sum = 0
for i in range(k):
	sum += (w + h) * 2 - 4
	w -= 4
	h -= 4
print(str(sum))


arr = input().split()
w = int(arr[0])
h = int(arr[1])
k = int(arr[2])
summ = 0
for i in range(1, k + 1):
	summ += (w - 4 * (i - 1)) * 2 + (h - 4 * (i - 1) - 2) * 2
print(summ)


(w, h, k) = map(int, input().split())
rez = 0
for i in range(k):
	kolvokletok = (w + h) * 2 - 4
	rez += kolvokletok
	w -= 4
	h -= 4
print(rez)


(w, h, k) = [int(x) for x in input().split(' ')]
cnt = 0
cw = w
ch = h
for i in range(k):
	cnt += 2 * (cw + ch) - 4
	cw -= 4
	ch -= 4
print(cnt)


(a, b, c) = input().split()
a = int(a)
b = int(b)
c = int(c)
count = 0
d = 0
while a >= 3 and b >= 3:
	if c > d:
		count += 2 * a + 2 * (b - 2)
		d += 1
	a -= 4
	b -= 4
print(count)


(w, h, k) = map(int, input().split())
zero = 0
i = 0
zero = w * 2 + (h - 2) * 2
if k > 1:
	for j in range(k - 1):
		i += 2
		zero += (w - i * 2) * 2 + (h - 2 - i * 2) * 2
elif zero < 0:
	print(0)
	exit()
print(zero)


inpute = input().split()
a = int(inpute[0])
b = int(inpute[1])
k = int(inpute[2])
n = k
i = 0
x = 0
while n > 0:
	x += 2 * a + 2 * (b - 2)
	i += 1
	n += -1
	a += -4
	b += -4
print(x)


(w, h, k) = [int(i) for i in input().split()]
print(2 * k * (w + h) - 8 * (k - 1) * k - 4 * k)


(w, h, n_rings) = map(int, input().split())
summ = 0
for i in range(n_rings):
	w1 = w - i * 4
	h1 = h - i * 4
	summ += w1 * h1 - (w1 - 2) * (h1 - 2)
print(summ)


ls = list(input().split())
h = int(ls[0])
w = int(ls[1])
k = int(ls[2])
ans = 0
h -= 2
while k:
	ans += 2 * w + h * 2
	w -= 4
	h -= 4
	k -= 1
print(ans)


(w, h, co) = map(int, input().split())
ans = 0
for i in range(1, co + 1):
	ans += 2 * (w - 4 * (i - 1) - 1) + 2 * (h - 4 * (i - 1) - 1)
print(ans)


x = list(map(int, input().split()))
w = x[0]
h = x[1]
n = x[2]
i = 0
g = 0
while i < n:
	g += (w + h - 2) * 2
	w = w - 4
	h = h - 4
	i += 1
print(g)


def count_per(a, b):
	return 2 * (a + b - 2)
(w, h, k) = map(int, input().split())
cells = 0
for number in range(k):
	cells += count_per(w, h)
	w -= 4
	h -= 4
print(cells)


import math
(w, h, k) = map(int, input().split())
p = 2 * w + 2 * (h - 2)
gold = 0
for i in range(k):
	gold += p
	p = p - 16
print(gold)


(w, h, k) = map(int, input().split(' '))
n = 0
minus = -2
for i in range(1, k + 1):
	minus += 2
	n += 2 * (h - minus * 2) + 2 * (w - minus * 2 - 2)
print(n)


a = input()
b = []
c = 0
for i in a:
	if i == ' ':
		b.append(c)
		c = 0
	else:
		c = c * 10 + int(i)
b.append(c)
d = 0
for i in range(b[2]):
	d += b[0] * b[1] - (b[0] - 2) * (b[1] - 2)
	b[0] = b[0] - 4
	b[1] = b[1] - 4
print(d)


(a, b, c) = input().split()
a = int(a)
n = 0
b = int(b)
c = int(c)
for i in range(c):
	n += 2 * (a - 4 * i + b - 4 * i - 2)
print(n)


(w, h, k) = (int(v) for v in input().split())
print((2 * (2 * w + 2 * h - 4) - 16 * (k - 1)) * k // 2)


(h, w, k) = map(int, input().split())
print(2 * k * (h + w - 2 - 4 * (k - 1)))


a = input()
s = a.split()
w = int(s[0])
h = int(s[1])
k = int(s[2])
answer = 0
while k != 0:
	answer = answer + 2 * (h - 2) + 2 * (w - 2) + 4
	h = h - 4
	w = w - 4
	k = k - 1
print(answer)


(w, h, k) = (int(i) for i in input().split())
res = 0
i = 1
while w - 4 * (i - 1) > 0 and h - 4 * (i - 1) > 0 and (k > 0):
	width = w - 4 * (i - 1)
	height = h - 4 * (i - 1)
	res += 2 * (width + height) - 4
	i += 1
	k -= 1
print(res)


def main():
	(w, h, k) = map(int, input().split(' '))
	h -= 2
	s = 0
	for i in range(k):
		s += (w + h) * 2
		h -= 4
		w -= 4
	print(s)
main()


(w, h, k) = map(int, input().split())
ans = 0
for i in range(1, k + 1):
	a = w - 4 * (i - 1)
	b = h - 4 * (i - 1)
	ans += 2 * a + 2 * b - 4
print(ans)


(a, b, n) = map(int, input().split())
a -= 1
b -= 1
p = 0
for i in range(n):
	p += (a + b) * 2
	a -= 4
	b -= 4
print(p)


a = list(map(int, input().split()))
t = 0
c = a[2]
h = a[0]
m = a[1]
for i in range(0, c):
	t = t + 2 * (h + m) - 4
	h = h - 4
	m = m - 4
print(t)


input = list(map(int, input().split()))
i = 0
ochislo = 0
while i != input[2]:
	if i == 0:
		x = input[0]
		y = input[1]
	chislo = 2 * x + 2 * (y - 2)
	ochislo = ochislo + chislo
	x = x - 4
	y = y - 4
	i = i + 1
print(ochislo)


def peri(w, h):
	return 2 * (w + h - 2)

def main():
	str = list(map(int, input().split()))
	w = str[0]
	h = str[1]
	amount = str[2]
	sum = 0
	for i in range(amount):
		sum += peri(w - 4 * i, h - 4 * i)
	print(sum)
main()


(l, b, k) = map(int, input().split())
count = 0
for i in range(k):
	count += 2 * (l + b - 2)
	l = l - 4
	b = b - 4
print(count)


def rect(w, h):
	return max(w * h, 0)
(w, h, k) = map(int, input().split())
ans = 0
for i in range(k):
	ans += rect(w, h) - rect(w - 2, h - 2)
	w -= 4
	h -= 4
print(ans)


(l, b, nr) = map(int, input().split())
gp = 0
for i in range(nr):
	gold = l * 2 + 2 * (b - 2)
	l -= 4
	b -= 4
	gp = gp + gold
print(gp)


(n, m, k) = map(int, input().split())
x = n
ans = 0
for i in range(k):
	ans += 2 * x
	x -= 4
x = m
for i in range(k):
	ans += 2 * x
	x -= 4
ans -= k * 4
print(ans)


(w, h, k) = map(int, input().split())
x = 0
for i in range(k):
	s = (w - 4 * i) * (h - 4 * i)
	h1 = h - 2
	w1 = w - 2
	x += s - (w1 - 4 * i) * (h1 - 4 * i)
print(x)


m = 0
a = input().split()
a[0] = int(a[0])
a[1] = int(a[1])
a[2] = int(a[2])
while a[2] > 0 and a[0] > 2 and (a[1] > 2):
	m = m + (2 * a[0] + 2 * (a[1] - 2))
	a[2] = a[2] - 1
	a[1] = a[1] - 4
	a[0] = a[0] - 4
print(m)


(a, b, c) = input().split()
d = 0
for i in range(int(c)):
	if not i == 0:
		a = int(a) - 4
		b = int(b) - 4
	d = d + 2 * int(a) + 2 * int(b) - 4
print(d)


(w, h, counter) = map(int, input().split())
kletki = 0
for i in range(counter + 1):
	if i != 0:
		kletki += 2 * w + 2 * (h - 2)
		w -= 4
		h -= 4
print(kletki)


(w, h, c) = map(int, input().split())
d = 0
for i in range(c):
	d = d + (2 * (w - 4 * i + h - 4 * i) - 4)
print(d)


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():
	(a, b, c) = LI()
	x = 0
	_a = a - 2
	_b = b - 2
	for i in range(c):
		x += a * b
		x -= _a * _b
		a = _a - 2
		b = _b - 2
		_a = a - 2
		_b = b - 2
	return x
print(main())


(w, h, k) = map(int, input().split())
s = 0
for q in range(k):
	s += 2 * (w + h - 2)
	w -= 4
	h -= 4
print(s)


(a, b, h) = map(int, input().split())
i = 0
c = 0
while i < h:
	c = c + (a + b) * 2 - 4
	a = a - 4
	b = b - 4
	i = i + 1
print(c)


(w, h, k) = (int(x) for x in input().split())
ans = 0
while k > 0:
	ans += w * 2 + (h - 2) * 2
	h -= 4
	w -= 4
	k -= 1
print(ans)


def rectangle(ls):
	c = 0
	while ls[2] > 0:
		c = c + (ls[0] * 2 + ls[1] * 2 - 4)
		ls[0] = ls[0] - 4
		ls[1] = ls[1] - 4
		ls[2] = ls[2] - 1
	return c
ls = [int(i) for i in input().split()]
print(rectangle(ls))


def per(a, b):
	return 2 * (a + b) - 4
(w, h, k) = (int(i) for i in input().split())
c = per(w, h)
for i in range(2, k + 1):
	c += per(w - 4 * (i - 1), h - 4 * (i - 1))
print(c)


(h, k, t) = list(map(int, input().split()))
sum = 0
while t:
	sum = sum + (h + k - 2) * 2
	h = h - 4
	k = k - 4
	t = t - 1
print(sum)


w_h_k = input().split(' ')
width = int(w_h_k[0])
height = int(w_h_k[1])
ring = int(w_h_k[2])
add = 0
for each in range(ring):
	cells = 2 * (height + width) - 4
	add += cells
	width -= 4
	height -= 4
print(add)


(n, m, k) = [int(i) for i in input().split()]
counter = 0
for i in range(k):
	counter += n * 2 - i * 4 * 2 + m * 2 - 4 - i * 4 * 2
print(counter)


import sys
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, m, k) = invr()
tot = 0
for i in range(k):
	tot += 2 * (m - i * 4) + 2 * (n - 4 * i - 2)
print(tot)


(a, b, k) = [int(i) for i in input().split()]
t = 0
while k != 0:
	t += 2 * a + 2 * b - 4
	a -= 4
	b -= 4
	k -= 1
print(t)


import math
(w, h, k) = (int(s) for s in input().split())
summ = 0
for i in range(k):
	summ += (w - 4 * i + (h - 4 * i)) * 2
summ -= 4 * k
print(summ)


inp = input()
inp = inp.split(' ')
height = int(inp[0])
width = int(inp[1])
num_rings = int(inp[2])

def create_ring(height, width):
	return 2 * height + 2 * (width - 2)
total_gilded = 0
for current_index in range(num_rings):
	total_gilded += create_ring(height - 4 * current_index, width - 4 * current_index)
print(total_gilded)


txt = input().split(' ')
w = int(txt[0]) - 2
h = int(txt[1])
k = int(txt[2])
P = 0
i = 0
while i < k:
	P1 = 2 * w + 2 * h
	P += P1
	w -= 4
	h -= 4
	i += 1
print(P)


(w, h, k) = map(int, input().split())
count = w * 2 + h * 2 - 4
now = w * 2 + h * 2 - 4
for i in range(k - 1):
	count += now - 16
	now = now - 16
print(count)


(x, y, k) = map(int, input().split(' '))
p = 0
while k > 0:
	p += (x + y) * 2 - 4
	x -= 4
	y -= 4
	k -= 1
print(p)


(w, h, k) = map(int, input().split())
d = 0
c = 0
if k == 0:
	print(0)
else:
	while k != 0:
		d = 2 * w + 2 * (h - 2)
		c += d
		w = w - 4
		h = h - 4
		k -= 1
	print(c)


(w, h, k) = input().split()
w = int(w)
h = int(h)
k = int(k)
r = 0
curW = w
curH = h
for i in range(1, k + 1):
	r = r + curW + curH + (curW - 2) + (curH - 2)
	curW = curW - 4
	curH = curH - 4
print(str(r))


from sys import stdin, stdout
(w, h, k) = map(int, stdin.readline().rstrip().split())
res = 0

def decorate_edge(w, h, k):
	global res
	while w >= 2 and h >= 2 and (k > 0):
		res += 2 * (w + h - 2)
		w -= 4
		h -= 4
		k -= 1
	return
decorate_edge(w, h, k)
stdout.write(str(res) + '\n')


(m, n, k) = map(int, input().strip().split())
r = 0
r = m * 2 + n * 2 - 4
k -= 1
res = r
while k != 0:
	res += r - 16
	r -= 16
	k -= 1
print(res)


k = list(map(lambda x: int(x), input().split()))
w = k[0]
h = k[1]
k = k[2]
q = 0
for i in range(0, k):
	q = q + ((w - 4 * i) * 2 + (h - 4 * i) * 2) - 4
print(q)


(w, h, k) = map(int, input().split())
if k == 1:
	print(2 * (h - 2 + w))
else:
	print(2 * (k * h - (2 + (k - 1) * 2) * k + k * w - (2 + 2 * (k - 1)) * (k - 1)))


def gold_plate():
	(w, h, k) = map(int, input().split(sep=' '))
	sum = 0
	for i in range(k):
		sum += (w + h) * 2 - 4
		h -= 4
		w -= 4
	print(sum)
gold_plate()


(w, h, k) = map(int, input().split())
s = 0
while k >= 1:
	k -= 1
	s += w * 2
	s += h * 2
	s -= 4
	w -= 4
	h -= 4
	if w <= 1 or h <= 1:
		break
print(str(s), end='')


(w, h, k) = map(int, input().split())
sum1 = 0
for i in range(k):
	if w > 0 and h > 0:
		sum1 += 2 * (h + w) - 4
		h -= 4
		w -= 4
print(sum1)


(sr, st, k) = map(int, input().split(' '))
s = 0
for i in range(k):
	s1 = sr * 2 + st * 2 - 4
	s += s1
	sr -= 4
	st -= 4
print(s)


def sum(x, y):
	sum = 2 * x + 2 * y - 4
	return sum
(w, h, k) = list(map(int, input().split()))
summ = 0
for i in range(k):
	summ += sum(w - 4 * i, h - 4 * i)
print(summ)


(w, h, k) = [int(x) for x in input().split()]
plates = 0
w1 = w
h1 = h
for i in range(2, k + 2):
	plates += 2 * w1 + 2 * h1 - 4
	w1 = w - 4 * (i - 1)
	h1 = h - 4 * (i - 1)
print(plates)


(w, h, k) = map(int, input().split())
res = 0
for i in range(k):
	if min(w, h) == 1:
		res += max(w, h)
	else:
		res += 2 * (w + h) - 4
	w -= 4
	h -= 4
print(res)


s = list(map(int, input().split()))
w = s[0]
h = s[1]
k = s[2]
a = 0
while k > 0:
	a += 2 * w + 2 * h - 4
	w -= 4
	h -= 4
	k -= 1
print(a)


(w, h, k) = map(int, input().split())
s = 0
(w, h) = (max(w, h), min(w, h))
for i in range(k):
	s += w * 2 + (h - 2) * 2
	h -= 4
	w -= 4
print(s)


(w, h, k) = tuple(map(int, input().split()))
amount = 0
for i in range(k):
	amount += 2 * (w + h - 2)
	w -= 4
	h -= 4
print(amount)


(w, h, k) = map(lambda x: int(x), input().split())
suma = 0
for i in range(k):
	suma += 2 * (w - 4 * i) + 2 * (h - 4 * i) - 4
print(suma)


(w, h, k) = map(int, input().split())
outer = w * 2 + (h - 2) * 2
result = 0
for i in range(1, k):
	w = w - 4
	h = h - 4
	inner = w * 2 + (h - 2) * 2
	result = result + inner
if k == 1:
	print(outer)
else:
	print(outer + result)


string = input().split()
(w, h, k) = (int(string[0]), int(string[1]), int(string[2]))
a1 = (w + h) * 2
an = (w - 4 * (k - 0.5) + (h - 4 * (k - 0.5))) * 2
print(int((a1 + an) / 2 * k))


h = 1
S = 0
(n, m, k) = map(int, input().split())
for i in range(k):
	n -= h
	m -= h
	if h == 1:
		h += 3
	S = S + 2 * (n + m)
print(S)


(w, h, k) = map(int, input().split())
p = 0
for i in range(1, k + 1):
	if w > 0 and h > 0:
		p += 2 * w + 2 * h - 4
		w -= 4
		h -= 4
	else:
		break
print(p)


from sys import stdin
input = stdin.readline
(w, h, k) = [int(x) for x in input().split()]
ans = 0
for _ in range(k):
	ans += w * 2 + (h - 2) * 2
	w -= 4
	h -= 4
print(ans)


(w, h, k) = map(int, input().split())
ans = int(2 * (w + h) * k - k * (16 * k - 8) / 2)
print(ans)


s = 0
(a, b, k) = map(int, input().split())
for x in range(1, k + 1):
	w = a - 4 * (x - 1)
	h = b - 4 * (x - 1)
	s += 2 * w + 2 * (h - 2)
print(s)


c = input().split()
for i in range(len(c)):
	c[i] = int(c[i])
w = c[0]
h = c[1]
k = c[2]
N = 0
for i in range(k):
	N += 2 * (w - 4 * i) + 2 * (h - 2 - 4 * i)
print(N)


a = []
for inp in input().split():
	a.append(int(inp))
(w, h, k) = a
answ = 0
for i in range(k):
	answ += (w - 4 * i) * 2 + (h - 4 * i) * 2 - 4
print(answ)


def count(i):
	return (w - 4 * (i - 1)) * (h - 4 * (i - 1)) - (w - 4 * (i - 0.5)) * (h - 4 * (i - 0.5))
(w, h, k) = [int(i) for i in input().split()]
print(int(sum([count(i) for i in range(1, k + 1)])))


(w, h, k) = (int(x) for x in input().split())
ans = 0
for i in range(1, k + 1):
	width = w - 4 * (i - 1)
	height = h - 4 * (i - 1)
	ans += 2 * (height + width - 2)
print(ans)


(side1, side2, numRings) = [int(x) for x in input().split()]
answer = 0
for i in range(0, numRings):
	answer += (side1 - 1 - i * 4) * 2 + (side2 - 1 - i * 4) * 2
print(answer)


(w, h, k) = map(int, input().split())
s = 0
while True:
	if k == 0:
		print(s)
		break
	s += (w + h) * 2 - 4
	w -= 4
	h -= 4
	k -= 1


w = list(map(int, input().split()))
a = w[0]
b = w[1]
n = w[2]
S = 0
for i in range(n):
	S += b + b + (a - 2) * 2
	b = b - 4
	a = a - 4
print(S)


(w, h, k) = map(int, input().split())
ans = 0

def glide(x, y):
	return x * 2 + (y - 2) * 2
for j in range(k):
	ans += glide(w, h)
	w -= 4
	h -= 4
print(ans)


(w, h, k) = map(int, input().strip().split())
cells = 0
for i in range(k):
	cells += w * 2 + h * 2 - 4
	w -= 4
	h -= 4
print(cells)


(w, h, k) = map(int, input().split())
m = [[0] * w for i in range(h)]
z = 0
for i in range(1, k + 1):
	for j in range(h - 4 * (i - 1)):
		for p in range(w - 4 * (i - 1)):
			m[0 + z][p + z] = 1
			m[j + z][0 + z] = 1
			m[-1 - z][p + z] = 1
			m[j + z][-1 - z] = 1
	z += 2
s = 0
for i in range(h):
	s += sum(m[i])
print(s)


(w, h, k) = map(int, input().split())
col = 0
for i in range(1, k + 1):
	x = w - 4 * (i - 1)
	y = h - 4 * (i - 1)
	col += x * y - (x - 2) * (y - 2)
print(col)


(w, h, k) = [int(i) for i in input().strip().split(' ')]
total = 0
for i in range(k):
	total += 2 * (w - 4 * i + (h - 4 * i)) - 4
print(total)


def main():
	[w, h, k] = [int(x) for x in input().split()]
	gilded = 0
	for _ in range(k):
		if w > 0 and h > 0:
			gilded += (w + h) * 2 - 4
		w -= 4
		h -= 4
	print(gilded)
main()


(w, h, k) = map(int, input().split())

def kol(h, w):
	a = (h + w) * 2 - 4
	return a
suma = 0
for i in range(0, k):
	suma += kol(h, w)
	h -= 4
	w -= 4
print(suma)


(w, h, k) = [int(i) for i in input().split()]
i = 1
d = 0
q = 2 * (w - 4 * (i - 1)) + 2 * (h - 4 * (i - 1) - 2)
d += q
while i != k:
	i += 1
	q = 2 * (w - 4 * (i - 1)) + 2 * (h - 4 * (i - 1) - 2)
	d += q
print(int(d))


(w, h, k) = map(int, input().split())
list = []
while k != 0:
	p = w + w + (h - 2) * 2
	list.append(p)
	w = w - 4
	h = h - 4
	k = k - 1
print(sum(list))


from math import ceil

def main():
	(n, m, k) = [int(v) for v in input().split()]
	s = 0
	for i in range(0, k):
		s += (n - i * 4) * 2 + (m - i * 4) * 2 - 4
	print(s)
main()


inp = list(map(int, input().split()))
h = inp[0]
w = inp[1]
above = inp[2]
h1 = 0
w1 = 0
zol = 0
for i in range(1, above + 1):
	h1 = h - 4 * (i - 1)
	w1 = w - 4 * (i - 1)
	zol += 2 * h1 - 4 + 2 * w1
print(zol)


a = input()
a = a.split(' ')
h = int(a[0])
w = int(a[1])
k = int(a[2])
result = 0
for i in range(k):
	result += (h - 4 * i + w - 4 * i - 1) * 2 - 2
print(result)


(a, b, c) = map(int, input().split(' '))
k = list()
l = 0
o = 0
l += a
o += b
ui = list()
lol = 0
y = 0
ji = 0
ji += c
while True:
	if l - 2 > 0 and o - 2 > 0:
		k.append(int(l * o))
		l += -2
		o += -2
	elif l - 2 == 0 or o - 2 == 0:
		k.append(int(l * o))
		break
	elif l - 2 == -1 or o - 2 == -1:
		k.append(int(l * o))
		break
for i in range(len(k)):
	if i == 0 or i % 2 == 0:
		ji += -1
		if ji < 0:
			break
	if i == len(k) - 1:
		y = k[i]
	else:
		y = k[i] - k[i + 1]
	ui.append(y)
for i in range(0, len(ui), 2):
	if c > 0:
		lol += ui[i]
		c += -1
	else:
		break
print(lol)


(w, h, k) = input().split()

def ring(x, y):
	s1 = x * y
	if x > 2 and y > 2:
		s2 = (x - 2) * (y - 2)
	else:
		s2 = 0
	return s1 - s2
s = 0
w = int(w)
h = int(h)
for i in range(int(k)):
	s += ring(w, h)
	w -= 4
	h -= 4
print(s)


(w, h, k) = map(int, input().split())
s = 0
while w > 0 and h > 0 and (k > 0):
	s += w * h - (w - 2) * (h - 2)
	w -= 4
	h -= 4
	k -= 1
print(s)


entrada = input().split()
w = int(entrada[0])
h = int(entrada[1])
k = int(entrada[2])

def gilding_outer(a, b):
	return 2 * a + 2 * b - 4
suma = 0
for i in range(k):
	suma += gilding_outer(w, h)
	w -= 4
	h -= 4
print(suma)


(w, h, k) = map(int, input().split())
p = (w + h) * 2 - 4
res = 0
for i in range(k):
	res += p
	p -= 16
print(res)


(a, b, c) = map(int, input().split())
count = 0
for i in range(c):
	count += 2 * (a - 4 * i) + 2 * (b - 4 * i) - 4
print(count, end='')


def count(a, b, k):
	sum_ = 0
	for _ in range(k):
		sum_ += a * b - (a - 2) * (b - 2)
		a -= 4
		b -= 4
	print(sum_)
(w, h, k) = map(int, input().split())
count(w, h, k)


fin = input()
(a, b, c) = map(int, fin.split())
rings = 0
for ring in range(c):
	rings = rings + (2 * a + 2 * b - 4)
	a = a - 4
	b = b - 4
print(rings)


(n, m, k) = [int(x) for x in input().split()]
tot = 0
for item in range(k):
	tot += 2 * m + 2 * (n - 2)
	m -= 4
	n -= 4
print(tot)


(w, h, k) = map(int, input().split())
K = 0
n = 0
out = 0
while k != K:
	K += 1
	out += (w - n) * 2 + (h - n) * 2 - 4
	n += 4
print(out)


(a, b, c) = map(int, input().split())
ans = 0
while c > 0:
	ans += (a + b - 2) * 2
	c -= 1
	a -= 4
	b -= 4
print(ans)


a = list(map(int, input().split()))
rows = a[0]
columns = a[1]
rings = a[2]
i = 0
glided = 0
while rings > 0:
	glided += (rows - i * 4) * 2 + (columns - 2 - 4 * i) * 2
	i += 1
	rings -= 1
print(glided)


(w, h, k) = map(int, input().split())
count = 0
if w < h:
	(w, h) = (h, w)
while k:
	count += w * 2 + (h - 2) * 2
	w = w - 4
	h = h - 4
	k -= 1
print(count)


t = input()
k = len(t)
a = ''
b = ''
v = ''
sc = 0
for i in range(0, k):
	if t[i] in ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9'):
		if sc == 0:
			a = a + t[i]
		if sc == 1:
			b = b + t[i]
		if sc == 2:
			v = v + t[i]
	else:
		sc = sc + 1
a = int(a)
b = int(b)
v = int(v)
sqwer = 0
isk = 0
for i in range(0, v):
	sqwer = (a - i * 4 + (b - i * 4)) * 2 - 4
	isk = isk + sqwer
print(isk)


(a, b, c) = map(int, input().split())
sum = 0
for i in range(c):
	sum = max(sum + 2 * (a + b) - 4, sum)
	b -= 4
	a -= 4
print(sum)


(w, h, i) = map(int, input().split())
res = 0
for n in range(i):
	res += (w - 4 * n) * (h - 4 * n) - (w - 4 * n - 2) * (h - 4 * n - 2)
print(res)


(w, h, k) = [int(x) for x in input().split(' ')]
g = 0
while w > 1 and h > 1 and (k > 0):
	g += 2 * (w + h) - 4
	w -= 4
	h -= 4
	k -= 1
print(g)


(n, m, k) = map(int, input().split(' '))
gl = 0
for i in range(1, k + 1):
	gl += 2 * n + 2 * (m - 2)
	n = n - 4
	m = m - 4
print(gl)


(w, h, k) = map(int, input().split())

def c(w, h, k):
	if k == 0 or w < 2 or h < 2:
		return 0
	else:
		return 2 * w + 2 * (h - 2) + c(w - 4, h - 4, k - 1)
print(c(w, h, k))


import sys

def main():
	(w, h, k) = map(int, sys.stdin.read().strip().split())
	return sum((2 * (w + h - i * 8 - 2) for i in range(k)))
print(main())


(x, y, n) = map(int, input().split())
ans = 0
while n > 0:
	ans += (x + y) * 2 - 4
	x -= 4
	y -= 4
	n -= 1
print(ans)


(h, w, z) = [int(i) for i in input().split()]
c = 0
a = 0
for i in range(1, z + 1):
	c = c + (h - a) * 2 + (w - a - 2) * 2
	a = a + 4
print(c)


import sys
import string
from math import gcd
import getpass
import math
from decimal import Decimal

def ria():
	return [int(i) for i in input().split()]
if getpass.getuser() != 'frohenk':
	filename = 'half'
else:
	sys.stdin = open('input.txt')
(w, h, k) = ria()
suma = 0
for i in range(k):
	suma += w * 2 + h * 2 - 4
	w -= 4
	h -= 4
print(suma)


(w, h, k) = map(int, input().split())
print(sum(map(lambda x: 2 * (w + h - 8 * x) - 4, range(k))))


(w, h, k) = map(int, input().split())
sum = 0
for i in range(k):
	if h - i * 4 == 1 and w - i * 4 == 1:
		sum += 1
	elif h - i * 4 == 1:
		sum += w - i * 4
	elif w - i * 4 == 1:
		sum += h - i * 4
	else:
		sum += 2 * (h - i * 4) + 2 * (w - i * 4) - 4
print(sum)


(w, h, k) = [int(i) for i in input().split()]
s = 0
while k != 0:
	b = 2 * w + 2 * (h - 2)
	k = k - 1
	s = s + b
	w = w - 4
	h = h - 4
print(s)


(x, y, k) = [int(i) for i in input().split()]
o = 0
for i in range(k):
	o += x * 2 + (y - 2) * 2
	y -= 4
	x -= 4
print(o)


(a, b, c) = input().split()
a = int(a)
b = int(b)
c = int(c)
ans = 0
d = 4
while c != 0:
	ans = ans + 2 * a + 2 * b
	ans = ans - d
	d = d + 4
	a = a - 3
	b = b - 3
	c = c - 1
print(ans)


(w, h, k) = map(int, input().split())
ans = 0
for i in range(1, k + 1):
	ans += 2 * (w + h - 2) - 16 * (i - 1)
print(ans)


(w, h, k) = map(int, input().split())
answ = 0
for _ in range(k):
	S = w * h - (w - 2) * (h - 2) if min(w, h) > 2 else w * h
	answ += S
	w -= 4
	h -= 4
print(answ)


gi = lambda : list(map(int, input().split()))
(w, h, k) = gi()
ans = 0
while k and w and h:
	ans += 2 * (w + h) - 4
	w -= 4
	h -= 4
	k -= 1
print(ans)


def max1(a):
	p = a[0]
	for x in a:
		if x > p:
			p = x
	return p

def prlist(a):
	for x in a:
		print(x, end=' ')

def pc(w, h):
	return 2 * (w + h - 2)
(w, h, k) = list(map(int, input().split()))
t = 0
for i in range(k):
	t += pc(w, h)
	w -= 4
	h -= 4
print(t)


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


(w, h, k) = input().split()
(w, h, k) = (int(w), int(h), int(k))
x = 0
while w > 0 and h > 0 and (k > 0):
	x = x + 2 * w + 2 * h - 4
	k = k - 1
	w = w - 4
	h = h - 4
print(x)


(a, b, c) = (int(x) for x in input().split())
r = 0
for x in range(c):
	r += (a - x * 4 + (b - x * 4) - 2) * 2
print(r)


(w, h, k) = map(int, input().split(' '))
i = 0
a1 = 0
while i != k:
	i += 1
	a = (w - 4 * (i - 1)) * 2 + (h - 4 * (i - 1)) * 2 - 4
	a1 += a
print(a1)


x = input()
x = x.split()
w = int(x[0])
h = int(x[1])
k = int(x[2])
p = 0
for i in range(1, k + 1):
	l = w - 4 * (i - 1)
	b = h - 4 * (i - 1)
	x = 2 * (l + b - 2)
	p += x
print(p)


s = input()
a = s.split()
arr = [int(i) for i in a]
sum1 = int(0)
k = arr[2]
if k > 1:
	for i in range(k):
		sum1 = sum1 + 2 * (arr[0] - 4 * i)
		sum1 = sum1 + 2 * (arr[1] - 2 - 4 * i)
	print(sum1)
else:
	sum1 = sum1 + 2 * arr[0]
	sum1 = sum1 + 2 * (arr[1] - 2)
	print(sum1)


t = input().split(' ')
w = int(t[0])
h = int(t[1])
sum = 0
for i in range(int(t[2])):
	sum = sum + 2 * (w + h) - 4
	w = w - 4
	h = h - 4
print(sum)


def test_a():
	sm = 0
	(w, h, k) = map(int, input().split())
	for i in range(k):
		sm += 2 * (w - 2 - i * 4 + (h - i * 4))
	print(sm)
test_a()


(w, h, k) = map(int, input().split())
V = 0
R = 2 * h + 2 * w - 4
while k > 0:
	V += R
	R -= 16
	k -= 1
print(V)


def main():
	(n, m, k) = map(int, input().split())
	res = 0
	for _ in range(k):
		res += n * 2 + (m - 2) * 2
		(n, m) = (n - 4, m - 4)
	print(res)
main()


(N, W, k) = map(int, input().split())
res = 0
for i in range(k):
	res += (N + W) * 2 - 4
	N -= 4
	W -= 4
print(res)


a = input().split(' ')
b = int(a[0])
c = int(a[1])
sum = 0
for i in range(int(a[2])):
	sum = sum + 2 * (b + c) - 4
	b = b - 4
	c = c - 4
print(sum)


def main():
	(w, h, k) = [int(x) for x in input().split(' ')]
	ans = 0
	for i in range(k):
		ans += 2 * (w - 4 * i + h - 4 * i) - 4
	print(ans)
main()


from math import *
(w, h, k) = map(int, input().split())
ans = 0
while (w > 0 and h > 0) and k > 0:
	if w == 1 or h == 1:
		ans += w + h - 1
	else:
		ans += 2 * (w + h - 2)
	k -= 1
	w -= 4
	h -= 4
print(ans)


(w, h, k) = map(int, input().split(' '))
s = 0
while k != 0:
	p = 2 * (w + h - 2)
	s += p
	w -= 4
	h -= 4
	k -= 1
if w == -3 and h == -3:
	print(s + 1)
else:
	print(s)


(n, m, k) = map(int, input().split())
p = 2 * (n + m - 2)
m -= 6
n -= 4
l = 1
while m > 0 and n > 0 and (l < k):
	p += 2 * (n + m)
	n -= 4
	m -= 4
	l += 1
print(p)


(a, b, c) = map(int, input().split())
x = (a + b - 2) * 2
y = x - 16 * (c - 1)
print((x + y) * c // 2)


(x, y, i) = input().split()
(a, b, c) = (int(x), int(y), int(i))
gold = 0
for j in range(1, c + 1):
	d = a - 4 * (j - 1)
	e = b - 4 * (j - 1)
	gold = gold + ((d + e) * 2 - 4)
print(int(gold))


(w, h, k) = map(int, input().split())
w1 = min(w, h)
h1 = max(w, h)
res = 0
for i in range(1, k + 1):
	res += 2 * (w - 4 * (i - 1)) + 2 * (h - 4 * (i - 1) - 2)
print(res)


(l, w, k) = map(int, input().split())
c = 0
for i in range(k):
	c += l * w - (l - 2) * (w - 2)
	l -= 4
	w -= 4
print(c)


(w, h, k) = [int(i) for i in input().split()]
countOfGold = 0
for numberOfShape in range(1, k + 1):
	currentWidth = w - 4 * (numberOfShape - 1)
	currentHeight = h - 4 * (numberOfShape - 1)
	countOfGold += 2 * currentWidth + 2 * (currentHeight - 2)
print(countOfGold)


(w, h, k) = map(int, input().split())
i = 0
p = 0
s = 0
if k == 1:
	print((w + h) * 2 - 4)
elif k != 1:
	while i < k:
		p = (w + h) * 2 - 4
		w -= 4
		h -= 4
		s += p
		i += 1
	print(s)


(n, m, k) = list(map(int, input().split()))
x = (n + m - 2) * 2
print(k * (x - 8 * (k - 1)))


Input = [int(i) for i in input().split()]
(w, h, k) = Input
(i, S) = (1, 0)
while (i + 1) // 2 <= k:
	if i % 2 != 0:
		S += (w - 2 * (i - 1)) * (h - 2 * (i - 1))
	else:
		S -= (w - 2 * (i - 1)) * (h - 2 * (i - 1))
	i += 1
print(S)


(m, n, k) = map(int, input().split())
a = 0
if m == 1:
	print(n)
if m == 2:
	print(2 * n)
for i in range(k):
	a += 2 * (m - 4 * i) + 2 * (n - 4 * i) - 4
print(a)


(w, h, k) = [int(i) for i in input().split(' ')]
zol = 0
for i in range(1, k + 1):
	zol += (w - 4 * (i - 1)) * (h - 4 * (i - 1)) - (w - 4 * (i - 1) - 2) * (h - 4 * (i - 1) - 2)
print(zol)


(w, h, c) = map(int, input().split())
result = 0
for i in range(1, c + 1):
	a = w - 4 * (i - 1)
	b = h - 4 * (i - 1)
	result += 2 * (a + b) - 4
print(result)


(m, n, k) = map(int, input().split())
i = 0
s = 0
while m > 0 and n > 0 and (i < k):
	s += (m + n - 2) * 2
	m -= 4
	n -= 4
	i += 1
print(s)


(w, h, k) = (int(x) for x in input().split())
new_w = w
new_h = h
count = 0
for i in range(k):
	if new_h > 0 and new_w > 0:
		count += 4
		count += 2 * (new_h - 2) + 2 * (new_w - 2)
		new_w -= 4
		new_h -= 4
	else:
		break
print(count)


a = [int(a) for a in input().split()]
r = 1
b = -0
while r <= a[2]:
	w = a[0] - 4 * (r - 1)
	h = a[1] - 4 * (r - 1)
	b = b + 2 * w + 2 * h - 4
	r = r + 1
print(b)


arr = [int(x) for x in input().split()]
ans = 0
for k in range(arr[2]):
	ans += 2 * arr[0] + 2 * (arr[1] - 2)
	(arr[0], arr[1]) = (arr[0] - 4, arr[1] - 4)
print(ans)


(w, h, k) = map(int, input().split())
s = [[0] * h for i in range(w)]
x = 0
for i in range(k):
	for a in range(w):
		for b in range(h):
			if a == x or b == x or a == w - x - 1 or (b == h - x - 1):
				if a > x - 1 and a < w - x and (b > x - 1) and (b < h - x):
					s[a][b] = 1
	x += 2
print(sum([sum(i) for i in s]))


a = []
s = input()
x = s.split()
a = [int(y) for y in x]
r = 0
i = 1
c = 0
while r < a[2]:
	c += 2 * (a[0] - 4 * (i - 1) + (a[1] - 4 * (i - 1)) - 2)
	r += 1
	i += 1
print(c)


(w, h, k) = tuple(map(int, input().split()))
cells = 0
for _ in range(k):
	cells += 2 * w + 2 * h - 4
	w -= 4
	h -= 4
print(cells)


(h, w, k) = input().split()
h = int(h)
w = int(w)
k = int(k)
plat = 0
while k > 0:
	plat += h * 2 + 2 * (w - 2)
	h = h - 4
	w = w - 4
	k -= 1
print(plat)


(r, c, b) = map(int, input().split())
count = 0
for i in range(b):
	count = count + 2 * (r - 2 * (2 * i + 1)) + 2 * (c - 4 * i)
print(count)


def solve(s):
	(a, b, k) = list(map(int, s.split(' ')))
	ck = 0
	if k > 1:
		ck += solve('{} {} {}'.format(a - 4, b - 4, k - 1))
	ck += b * 2 + 2 * (a - 2)
	return ck
print(solve(input()))


(w, h, k) = map(int, input().split())
ans = 0
for i in range(1, k + 1):
	val1 = w - 4 * (i - 1)
	val2 = h - 4 * (i - 1)
	ans += val1 * val2 - (val1 - 2) * (val2 - 2)
print(ans)


(w, h, k) = map(int, input().split())
c = 0
i = 0
while i < k:
	if w > 1 and h > 1:
		c = c + (h * 2 + w * 2 - 4)
		w = w - 4
		h = h - 4
	i = i + 1
print(c)


def mi(x, y):
	if x < y:
		return x
	else:
		return y

def ringu(a, b):
	return 2 * (a + b) - 4

def solution(l3):
	ans = 0
	c = l3[0]
	d = l3[1]
	e = l3[2]
	while mi(c, d) > 2 and e:
		ans += ringu(c, d)
		c -= 4
		d -= 4
		e -= 1
	return ans

def answer():
	a = [int(x) for x in input().split()]
	print(solution(a))
answer()


(x, y, k) = (int(e) for e in input().split(' '))
r = 0
for i in range(k):
	r += 2 * (x + y - 2)
	x -= 4
	y -= 4
print(r)


inp = list(map(int, input().split()))
rings = inp[2]
h = inp[0]
w = inp[1]
buf_h = 0
buf_w = 0
gold = 0
for i in range(1, rings + 1):
	buf_h = h - 4 * (i - 1)
	buf_w = w - 4 * (i - 1)
	gold += 2 * buf_h - 4 + 2 * buf_w
print(gold)


def getGoldTiles(l, w):
	return (l + w) * 2 - 4
(length, width, rings) = map(int, input().split())
total_tiles = 0
for ring in range(1, rings + 1):
	total_tiles += getGoldTiles(length, width)
	length -= 4
	width -= 4
print(total_tiles)


n = input().split(' ')
(w, h, k) = (int(n[0]), int(n[1]), int(n[2]))
z = 0
for i in range(k):
	z += 2 * (w + h) - 4
	w -= 4
	h -= 4
print(z)


(w, h, k) = [int(i) for i in input().split()]
sum = 0
for i in range(k):
	sum += 2 * (w + h - 8 * i) - 4
print(sum)


(w, h, k) = list(map(int, input().split()))
ans = 0
i = 0
min_wh = min(w, h)
while 4 * i < min_wh and i < k:
	ans += 2 * (w - 4 * i) + 2 * (h - 4 * i) - 4
	i += 1
print(ans)


(w, h, k) = map(int, input().split())
per = (w + h - 2) * 2
ans = per
k -= 1
while k > 0:
	per = per - 16
	ans += per
	k -= 1
print(ans)


(a, b, counter) = map(int, input().split())
cell = 0
for i in range(counter + 1):
	if i != 0:
		cell += 2 * a + 2 * (b - 2)
		a -= 4
		b -= 4
print(cell)


(w, h, k) = list(map(int, input().split()))
l = [[0 for i in range(h)] for i in range(w)]
s = 0
for i in range(k):
	for i in range(s, h - s):
		l[s][i] = 1
		l[-1 - s][i] = 1
	for j in range(s, w - s):
		l[j][s] = 1
		l[j][-1 - s] = 1
	s += 2
s = 0
for i in range(len(l)):
	for j in range(len(l[0])):
		if l[i][j] == 1:
			s += 1
print(s)


(w, h, k) = [int(x) for x in input().split()]

def get(a, b):
	return a * 2 + (b - 2) * 2
ans = 0
for i in range(k):
	ans += get(w, h)
	w -= 4
	h -= 4
print(ans)


(w, h, k) = map(int, input().split())
kol = 0
d = w
v = h
for i in range(k):
	if d - 2 < 0 or v - 2 < 0:
		kol += d * v
	else:
		kol += d * v - (d - 2) * (v - 2)
	d -= 4
	v -= 4
print(kol)


s = input()
n = s.split()
for (i, item) in enumerate(n):
	n[i] = int(item)
sum = 0
for i in range(n[2]):
	sum += (n[0] + n[1] - 2) * 2
	n[0] -= 4
	n[1] -= 4
print(sum)


(w, h, k) = map(int, input().split(' '))
s = 0
for i in range(k):
	s += 2 * (h - i * 8 + w - 2)
print(s)


a = list(map(int, input().split()))
w = a[0]
h = a[1]
k = a[2]
s = 0
d = 2
for i in range(k):
	s += (w + h - d) * 2
	d += 8
print(s)


a = input().split()
for i in range(len(a)):
	a[i] = int(a[i])
m = a[0]
n = a[1]
k = a[2]
s = 0
for i in range(k):
	if m > 0 and n > 0:
		s = s + 2 * (m + n) - 4
		m = m - 4
		n = n - 4
print(s)


(w, h, k) = input().split()
w = int(w)
h = int(h)
k = int(k)
print(2 * k * (w + h - 2) - 8 * k * (k - 1))


whk = list(map(int, input().split()))
color = 0
w = whk[0]
h = whk[1]
k = whk[2]
for i in range(1, k + 1):
	a = w - 4 * (i - 1)
	b = h - 4 * (i - 1)
	color += a * 2 + b * 2 - 4
print(color)


(w, h, k) = [int(a) for a in input().split()]
cells = 0
for i in range(k):
	cells += 2 * h + 2 * w - 4
	h -= 4
	w -= 4
print(cells)


def solve(w, h, k):
	ans = 0
	for i in range(1, k + 1):
		a = w - 4 * (i - 1)
		b = h - 4 * (i - 1)
		if a > 0 and b > 0:
			ans += (a + b) * 2 - 4
		else:
			break
	return ans

def main():
	(w, h, k) = list(map(int, input().split()))
	print(solve(w, h, k))
main()


l = list(map(int, input().split()))
w = l[0]
h = l[1]
k = l[2]
c = 0
i = 1
while w > 0 and h > 0 and (i <= k):
	c += w * 2 + (h - 2) * 2
	w -= 4
	h -= 4
	i += 1
print(c)


(w, h, k) = map(int, input().split())
res = 0
for i in range(k):
	t = w * 2 + h * 2 - 4
	if t >= 0:
		res += t
	w -= 4
	h -= 4
print(res)


a = list(map(int, input().split()))
w = a[0]
h = a[1]
k = a[2]
p1 = 2 * (w + h) - 4
p2 = 0
w1 = 0
h1 = 0
if k <= (min(w, h) + 1) // 4:
	for i in range(2, k + 1):
		w1 = w - 4 * (i - 1)
		h1 = h - 4 * (i - 1)
		p2 += 2 * (w1 + h1) - 4
	print(p1 + p2)


(w, h, k) = list(map(int, input().split()))
total_sum = 0
for i in range(k):
	square = w * h - (w - 2) * (h - 2)
	total_sum += square
	w -= 4
	h -= 4
print(total_sum)


(w, h, k) = map(int, input().split())
s = w * h
p = 0
k -= 1
kk = 0
while kk <= k:
	ss = w * h
	ss1 = (w - 2) * (h - 2)
	w -= 4
	h -= 4
	p += ss - ss1
	kk += 1
print(p)


Z = list(map(int, input().split()))
a = Z[0]
b = Z[1]
c = Z[2]
s = 0
for i in range(c):
	if a * 2 + b * 2 - 4 > 0:
		s += a * 2 + b * 2 - 4
		a = a - 4
		b = b - 4
print(s)


(l, h, k) = map(int, input().split())
ko = 0
while k != 0 and l > 0 and (k > 0):
	ko += 2 * h + 2 * (l - 2)
	l -= 4
	h -= 4
	k -= 1
print(ko)


(h, w, k) = [int(value) for value in input().split(' ')]
output = 0
while k:
	P = 2 * w + 2 * (h - 2)
	output += P
	w -= 4
	h -= 4
	k -= 1
print(output)


def peri(w, h):
	return 2 * (w + h - 2)

def main():
	str = input().split()
	w = int(str[0])
	h = int(str[1])
	k = int(str[2])
	if k >= 1:
		sum = 0
		i = 0
		while i < k:
			sum += peri(w - 4 * i, h - 4 * i)
			i += 1
		print(sum)
main()


vvod = input().split()
w = int(vvod[0])
h = int(vvod[1])
k = int(vvod[2])
h = h - 2
res = 0
first = 2 * h + 2 * w
res += first
for i in range(k - 1):
	h = h - 4
	w = w - 4
	first = 2 * h + 2 * w
	res += first
print(res)


(w, h, k) = [int(i) for i in input().split()]
x = 2 * w + 2 * (h - 2)
if k > 1:
	for i in range(1, k):
		x = x + 2 * (w - 4 * i) + (2 * (h - 4 * i) - 4)
print(x)


(a, b, c) = map(int, input().split())
m = []
for i in range(c):
	x = 2 * (a - 4 * i + (b - 2 - 4 * i))
	m.append(x)
print(sum(m))


(w, h, k) = map(int, input().split())
sum1 = 0
t = 0
sum1 = w * 2 + (h - 2) * 2
if k > 1:
	for i in range(k - 1):
		t += 2
		sum1 += (w - t * 2) * 2 + (h - 2 - t * 2) * 2
print(sum1)


(a, b, n) = map(lambda x: int(x), input().split())
x = 0
for i in range(n):
	x += (a - i * 4) * (b - i * 4) - (a - i * 4 - 2) * (b - i * 4 - 2)
print(x)


def plate(w, h, k):
	result = 0
	for i in range(k):
		result += 2 * (w + h) - 4
		w -= 4
		h -= 4
	return result
(W, H, K) = [int(j) for j in input().split()]
print(plate(W, H, K))


(w, h, k) = map(int, input().split())
a = []
while k > 0:
	b = []
	b.append(w)
	b.append(h)
	a.append(b)
	w = w - 4
	h = h - 4
	k = k - 1
c = 0
for i in a:
	m = i[0]
	n = i[1]
	c = c + 2 * (m + n - 2)
print(c)


def func(w, h):
	return 2 * (w + h) - 4
(w, h, k) = map(int, input().split())
cnt = 0
for i in range(1, k + 1):
	cnt += func(w - 4 * (i - 1), h - 4 * (i - 1))
print(cnt)


(n, m, k) = map(int, input().split())
zn = 0
p = 0
f = 0
mass = []
for i in range(k):
	zn = (n - 2 - p) * 2 + (m - f) * 2
	p += 4
	f += 4
	mass.append(zn)
	d = sum(mass)
print(d)


(w, h, k) = [int(i) for i in input().split()]
ans = 0
for i in range(0, k):
	if w <= 0 or h <= 0:
		break
	elif w == 1:
		ans += h
	elif h == 1:
		ans += w
	else:
		ans += (w + h - 2) * 2
	w -= 4
	h -= 4
print(ans)


(a, b, c) = map(int, input().split())
x = 0
q = min(a, b)
w = max(a, b)
for i in range(c):
	x += (q - 4 * i) * 2 + (w - 2 - 4 * i) * 2
print(x)


def gh(a, b, c, s):
	if c == 0:
		return s // 2
	return gh(a - 4, b - 4, c - 1, s + (a + b - 2) * 4)
(a, b, c) = map(int, input().split())
print(gh(a, b, c, 0))


def a(w, h, k1):
	if k1 == 0:
		return 0
	return w + w + h + h - 4 + a(w - 4, h - 4, k1 - 1)
print(a(*list(map(int, input().split()))))


(w, h, k) = map(int, input().split())
res = 0
n = w * 2
m = (h - 2) * 2
res1 = n + m
for i in range(2, k + 1):
	n = (w - 2 * k) * 2
	m = (h - 2 * k - 2) * 2
	res = res + n + m
print('%d' % (res + res1))


q = lambda : map(int, input().split())
qi = lambda : int(input())
qs = lambda : input().split()
(n, m, k) = q()
c = 0
for _ in [0] * k:
	c += n * 2 + (m - 2) * 2
	if n > 1 and m > 1:
		n -= 4
		m -= 4
	else:
		break
print(c)


import sys
input = sys.stdin.readline
l = list(map(int, input().split()))
s = 0
while l[-1]:
	s += 2 * (l[0] + l[1] - 2)
	l[-1] -= 1
	l[0] -= 4
	l[1] -= 4
	if l[0] * l[1] <= 0:
		break
print(s)


(w, h, k) = map(int, input().split())
s = 0
while k > 0:
	w1 = w * 2
	h1 = (h - 2) * 2
	s += h1 + w1
	k -= 1
	h -= 4
	w -= 4
print(s)


(w, h, k) = [int(i) for i in input().split()]

def f(w, h, k):
	if k <= 0:
		return 0
	if 1 in [w, h]:
		return w + h - 1
	return 2 * (w + h - 2) + f(w - 4, h - 4, k - 1)
print(f(w, h, k))


inp = input().split(' ')
(w, h, k) = [int(x) for x in inp]
t = 0
for i in range(0, k):
	t += w * h - (w - 2) * (h - 2)
	(w, h) = (w - 4, h - 4)
print(t)


def give(w, h):
	return 2 * (w + h - 2)
(w, h, k) = map(int, input().split())
i = 0
ans = 0
while i < k:
	ans += give(w - 4 * i, h - 4 * i)
	i += 1
print(ans)


(a, b, n) = list(map(int, input().split()))
ans = 0
for i in range(n):
	ans += 2 * b + 2 * a - 4
	b -= 4
	a -= 4
print(ans)


import sys, time, os
from pprint import pprint as pp
if os.environ.get('_ONPC_', False):
	stdin = open('input.txt', 'r')
	stdout = open('output.txt', 'w')
	sys.stdin = stdin
	sys.stdout = stdout
	now = time.time()
	__flag = True
else:
	__flag = False

def what(obj):
	if __flag:
		pp(obj, sys.stderr)
(w, h, k) = map(int, input().split())
s = 0
for i in range(1, k + 1):
	s += 2 * (w - 4 * (i - 1) + (h - 4 * (i - 1))) - 4
print(s)
if __flag:
	stdout.close()
	stdin.close()
	print(time.time() - now, file=sys.stderr)


(n, m, k) = map(int, input().split())
(i, glided, j) = (n, 0, m)
while k > 0:
	glided += 2 * i + 2 * j - 4
	i -= 4
	j -= 4
	k -= 1
print(glided)


def zoloto(w, h, k):
	result = (w + h - 2) * 2
	if k == 1:
		return result
	else:
		return result + zoloto(w - 4, h - 4, k - 1)
numbers = input().split(' ')
(w, h, k) = (int(numbers[0]), int(numbers[1]), int(numbers[2]))
result = zoloto(w, h, k)
print(result)


f = [int(y) for y in input().split()]
w = f[0]
h = f[1]
k = f[2]
s = 0
for i in range(k):
	s += 2 * w + 2 * h - 4
	w -= 4
	h -= 4
print(s)


(m, h, k) = map(int, input().split())
s = 0
for i in range(1, k + 1):
	if i == 1:
		s += m * 2 + (h - 2) * 2
		continue
	else:
		s += (m - k * 2) * 2 + (h - 2 * k - 2) * 2
print(s)


(r, c, k) = input().split()
r = int(r)
c = int(c)
k = int(k)
sum1 = 0
while k:
	sum1 = sum1 + 2 * c + 2 * (r - 2)
	r = r - 4
	c = c - 4
	if r <= 0 or c <= 0:
		break
	else:
		k = k - 1
print(sum1)


inp = input().split(' ')
w = int(inp[0])
h = int(inp[1])
k = int(inp[2])
kl = []
answ = 0

def poz(mas, it):
	global answ
	answ += 2 * len(mas[0])
	for i in mas:
		answ += 2
	answ -= 4
	return mas
for i in range(w):
	kl.append([0 for j in range(h)])
for i in range(k):
	kl = poz(kl, i)
	newkl = kl.copy()
	newkl = newkl[1:-1]
	for j in range(len(newkl)):
		newkl[j] = newkl[j][1:-1]
	newkl = newkl[1:-1]
	for j in range(len(newkl)):
		newkl[j] = newkl[j][1:-1]
	kl = newkl.copy()
print(answ)


p = input().split()
h = int(p[0])
w = int(p[1])
k = int(p[2])
kol = 0
for i in range(k):
	kol += (w - i * 4 - 2) * 2 + (h - i * 4) * 2
print(kol)


(a, b, c) = [int(x) for x in input().split()]
hasil = 0
while c > 0:
	hasil += (a - 2 + (b - 2)) * 2 + 4
	a -= 4
	b -= 4
	c -= 1
print(hasil)


(w, h, k) = map(int, input().split())
s = sum((2 * (w - x * 4) + 2 * (h - 2 - x * 4) for x in range(k)))
print(s)


(w, h, k) = map(int, input().split())
ans_n = (w + h - 2) * 2
for n in range(k - 1):
	w -= 4
	h -= 4
	ans_n += (w + h - 2) * 2
print(ans_n)


n = input()
l = n.split()
w = int(l[0])
h = int(l[1])
k = int(l[2])
s = w * h - (w - 2) * (h - 2)
a = 0
b = 0
c = 0
for i in range(2, k + 1):
	a = w - 4 * (i - 1)
	b = h - 4 * (i - 1)
	c = a * b - (a - 2) * (b - 2)
	s += c
print(s)


(a, b, k) = map(int, input().split())
answer = 0
while k != 0:
	answer += (a + b) * 2 - 4
	a = a - 4
	b = b - 4
	k -= 1
print(answer)


m = input().split(' ')
w = int(m[0])
h = int(m[1])
k = int(m[2])
i = 1
tr = 0
while k != 0:
	zk = (w - 4 * (i - 1)) * (h - 4 * (i - 1)) - (w - 4 * (i - 1) - 2) * (h - 4 * (i - 1) - 2)
	i = i + 1
	tr = zk + tr
	k = k - 1
print(tr)


from sys import stdin
from collections import Counter
from math import sqrt, factorial, log10, log, floor, ceil
from itertools import permutations, combinations, combinations_with_replacement
input = stdin.readline

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

def lis():
	return list(map(str, input().split()))

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

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

def inps():
	return str(input().strip())

def pr(n):
	return stdout.write(str(n) + '\n')
INF = float('inf')

def solve():
	(w, h, k) = mp()
	res = 0
	while k > 0:
		res += 2 * w + 2 * h - 4
		w -= 4
		h -= 4
		k -= 1
	print(res)
t = 1
for i in range(t):
	solve()


(n, m, k) = map(int, input().split())
ans = 0
kk = 0
(mm, nn) = (m, n)
while n >= 1 and m >= 1 or kk < k:
	ans += 4 + 2 * n - 4 + 2 * m - 4
	kk += 1
	m -= 4
	n -= 4
	if kk == k:
		break
print(ans)


(w, h, k) = [int(i) for i in input().split()]
res = (w - 2 * k + 2) * k + (h - 2 * k) * k
print(res * 2)