Given three integers and . Find the -th term which is divisible by either of or .
Four natural numbers a, b, c and n~(a, b, c, n \le 10^9).
Print the -th term divisible by either or or . It is known that the answer is no more than 10^9.
Example 1
Example 2
Example 7