G. Fire Coverage
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

You are given a city in the form of a cells grid of size $$$N \times M$$$. You are allowed to place $$$K$$$ fire stations at any cell on the grid $$$\bf{(at\ integer\ coordinates)}$$$.

Fire station fire fighter can move in $$$8$$$ directions (up, down, left, right, diagonals).

The distance from a station at cell $$$(x_1, y_1)$$$ to cell $$$(x_2, y_2)$$$ is defined as:

  • $$$distance = \max(|x_1 - x_2|, |y_1 - y_2|)$$$

You want to place the fire stations optimally so that every cell in the grid is within $$$distance \le d$$$ from at least one station. Your task is to find the smallest possible value of $$$d$$$ that guarantees full coverage.

Input

The first and only line contains 3 integers $$$N,M,K$$$ ($$$1 \le N, M \le 10^9$$$, $$$1 \le K \le 10^5$$$) — dimensions of the grid, and the number of fire stations available, respectively.

Output

Print a single integer — the minimum value of $$$d$$$.

Examples
Input
5 5 4
Output
1
Input
2000 12 26
Output
38
Note

The distribution for the first sample provided above: