Huseyn likes buns very much, which are sold at ADA University in building C. It is known that
you can buy one bun for a qəpik;
you can buy three buns for b qəpik;
Huseyn wants to buy exactly n buns. What is the minimum number of qəpik he should spend?
Three positive integers a, b, and n, each not greater than 10^9.
Print the minimum number of qəpik that Huseyn should spend to buy exactly n buns.
Example 1