eolymp
bolt
Try our new interface for solving problems
Problems

n-th integer divisible by a or b

n-th integer divisible by a or b

Time limit 1 second
Memory limit 128 MiB

Given two integers a and b. Find the n-th positive integer that is divisible by either a or b.

Input data

Three integers a, b and n~(a, b, n \le 10^9).

Output data

Print the n-th positive integer divisible by either a or b. It is known that the answer is no more than 10^9.

Examples

Input example #1
2 5 10
Output example #1
16
Input example #2
3 7 25
Output example #2
57
Author Mykhailo Medvediev