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əpiks;
you can buy three buns for b qəpiks;
Huseyn wants to buy exactly n buns. What is the least number of qəpiks he should spend?
Three positive integers a,b and n, each is not greater than 109.
Print the least amount of qəpiks that Huseyn should spend to buy exactly n buns.