Problems

# n-th term divisible by a or b

# n-th term divisible by a or b

Given two integers **a** and **b**. Find the **n**-th term which is divisible by either of **a** or **b**.

#### Input

Three integers **a**, **b** and **n** (**a**, **b**, **n** ≤ `10`

).^{9}

#### Output

Print the **n**-th term divisible by either **a** or **b**. It is known that the answer is no more than `10`

.^{9}

Input example #1

2 5 10

Output example #1

16

Input example #2

3 7 25

Output example #2

57