e-olymp
Competitions

Just Math easy contest

Chocolate bars

It is hard to overestimate the role of chocolate bars in traditional programming competitions. Firstly, the nutritional content of chocolate significantly increases the number of brilliant ideas among the participants of the Olympiad. Geometric shape of the tiles is usually a rectangle of size a × b of square pieces 1 × 1, which in turn recalls the model of many problems.

Given the size of one chocolate bar a × b and the number of Olympiad participants n. The jury members want to determine the number of enough chocolate bars, so that breaking the bars into single pieces, it will be possible to divide them equally among all n participants. That is, each participants can receive equal number of square tiles 1 × 1.

Input

Positive integers a, b, n. All numbers do not exceed 100.

Output

Print the enough number of chocolate bars.

Time limit 1 second
Memory limit 128 MiB
Input example #1
3 5 6
Output example #1
2