n-th integer divisible by a or b#9018

n-th integer divisible by a or b

1 second
128 megabytes
Very easy

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

Input

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

Output

Print the -th positive integer that is divisible by either or . It is guaranteed that this number does not exceed 10^9.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading