n-th integer divisible by a or b#460

n-th integer divisible by a or b

1 second
128 megabytes
Medium (≈1350)

Given two integers and . Find the -th positive integer that is divisible by either or .

Input

Three integers and n~(a, b, n \le 10^9).

Output

Print the -th positive integer divisible by either or . It is known that the answer is no more than 10^9.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading