James has decided to tile the floor of his kitchen with square tiles. His kitchen can be represented by a rectangle of dimensions , while the square tiles have side length .
He starts by placing a tile in the lower left corner of the kitchen and then places other tiles next to it, keeping the edges aligned.

If a tile does not fit entirely in the room, he can cut it and reuse the cut piece for another edge.
Since the tiles have a very complex but symmetrical decorative pattern, cut tiles can be used with the constraint that the cut sides must only be in contact with the upper perimeter or the right perimeter of the room. There must be uncut sides of the tiles on the lower and left perimeters of the room. It is possible to rotate the tiles.
Task
At least how many tiles are necessary to pave the kitchen?
Input data
The input file consists of a line containing integers , , .
Output data
The output file must contain a single line consisting of integer , the minimal number of necessary tiles.
Constraints and clarifications
- .
- .
- .
| # | Score | Constraints |
|---|---|---|
| 1 | 0 | Examples |
| 2 | 10 | |
| 3 | 20 | |
| 4 | 30 | |
| 5 | 40 | No additional restrictions |
Example 1
stdin
5 7 3
stdout
4
Explanation
The first sample case corresponds to the one illustrated in the text. The tile scraps used for the top edge are used for the side edge and the corner.

Example 2
stdin
4 4 3
stdout
3
Explanation
In second sample case we want to obtain the following result:

To do this, James uses three tiles: one whole tile at the bottom left, one that is divided between the right side and the top edge, and one for the top right corner.

He couldn't use the remaining part of the second tile for the corner, otherwise he would have had cut edges adjacent to other tiles, as well as to the perimeter, which is against the rules for tiling.