Given two positive integers and . Find the -th positive integer that is divisible by either or .
Three positive integers and n~(a, b, n \le 10^9).
Print the -th positive integer that is divisible by either or . It is guaranteed that this number does not exceed 10^9.

Example 1
Example 2