시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB21117715984.127%

문제

Anya (Arup’s daughter) would like to add a window on the wall in her room. She asks Travis (the mathematician) to figure out the largest window she can have on her wall. Travis consults Chris (the engineer) to see if there are any structural constraints. Chris explains that there must be a minimum distance between the wall perimeter and the window perimeter for the wall to hold the window; otherwise the entire structure collapses.

Given the width and height of a rectangular wall and the window-border gap (minimum distance required between the perimeter of the wall and the perimeter of the window), determine the area of the largest rectangular window that can be installed on the wall.

입력

The input contains one line with three space-separated positive integers, w, h, and d (w, h < 1000, d < 100), representing, respectively, the wall’s width, wall’s height, and the minimum windowborder gap amount needed.

출력

The output should be an integer on one line by itself, which represents the area of the largest rectangular window that can be installed. If it is not possible to install a window, output 0 (zero).

예제 입력 1

40 25 5

예제 출력 1

450

예제 입력 2

30 20 12

예제 출력 2

0

예제 입력 3

30 20 50

예제 출력 3

0

예제 입력 4

999 888 7

예제 출력 4

860890