Technocup 2019 - Elimination Round 2
A
Golden Plate
Codeforces
800
原题
←B →
翻译中…

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.

翻译中…

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.

翻译中…

样例

Input #1
3 3 1
Output #1
8
InputCopy OutputCopy
Input #2
7 9 1
Output #2
28
InputCopy OutputCopy
Input #3
7 9 2
Output #3
40
InputCopy OutputCopy
题目信息
题号
1031A
时间限制
1 s
内存限制
256 MB
标签
模拟
数学

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。