Given two integers and . Find the -th positive integer that is divisible by either or .
Three integers and n~(a, b, n \le 10^9).
Print the -th positive integer divisible by either or . It is known that the answer is no more than 10^9.

Example 1
Example 2