n-th term divisible by a, b or c#9019

n-th term divisible by a, b or c

1 second
128 megabytes
Very easy

Given three integers and . Find the -th term which is divisible by either of or .

Input

Four natural numbers a, b, c and n~(a, b, c, n \le 10^9).

Output

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

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading

Example 7

Loading
Loading