CF1031A.Golden Plate

传统题 时间 2000 ms 内存 256 MiB 3 尝试 1 已通过 1 标签

Golden Plate

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

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 ww, hh and kk (3w,h1003 \le w, h \le 100, $1 \le k \le \left\lfloor \frac{min(n, m) + 1}{4}\right\rfloor$, where x\lfloor x \rfloor denotes the number xx 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.

The second example is shown on the picture below.

The third example is shown in the problem description.

Samples

3 3 1
8
7 9 1
28
7 9 2
40

在线编程 IDE

建议全屏模式获得最佳体验