Delayed Work

Choose the integer number of painters that minimizes total cost X times painters plus K/P times P delay charge, then round to three decimals.

Medium5MathBrute forceImplementationBinary searchInterviewNo attempts yetTime limit1sMemory limit512 MB

Problem

You run a company that paints houses. You can hire as many painters as you want, and each painter you hire costs XX dollars no matter how long that painter works. On top of that you pay a delay charge: if the job takes DD days, the charge is D×PD \times P dollars. The charge does not depend on how many painters you hired, and DD does not have to be a whole number of days, so you pay only for the exact time taken.

All painters work at the same rate. One painter finishes a house in KK days, and they cooperate well enough that MM painters finish it in K/MK/M days.

Find the smallest total amount you have to pay for one house, counting both the painters and the delay charge. The number of painters you hire is an integer of at least 1.

Input

The first and only line contains three integers KK, PP, XX, separated by spaces. (1K,P,X100001 \le K, P, X \le 10000)

Output

Print the minimum total cost on the first line, rounded to exactly three decimal places. Round a value that sits exactly halfway up. For example, 31.187531.1875 prints as 31.18831.188.