Diplomas#239

Diplomas

1 second
128 megabytes
Medium (≈1350)

Lala participated in many olympiads and obtained a large number of diplomas. After finishing school, she had a total of diplomas, and fortunately, all her diplomas were the same size, w\times h.

While studying at the university, Lala decided to decorate her room with her diplomas. She wanted to order a square frame to make the room wall look nice, and it was necessary to place all the diplomas in a square frame. According to the rules, all the diplomas must be placed in either a vertical or horizontal format within the frame.

Find the side of the minimum-sized square frame needed to accommodate Lala’s diplomas.

Input

The input contains three integers w, h, n\:(1 \le w, h, n \le 10^9). Here are the dimensions of the diplomas, and is the number of diplomas.

Output

Output the minimum side of the square frame. The image below is related to the sample test.

Examples

Example 1

Loading
Loading