using System;
using System.Collections.Generic;
public class Program {
    public static void Main() {
        //题目要求至少买x只竹鼠,买一只竹鼠需要a元,买三只竹鼠需要b元,应用贪心,尽量买性价比高的买法
        string[] inputs = Console.ReadLine().Split(' ');
        long.TryParse(inputs[0], out long a);
        long.TryParse(inputs[1], out long b);
        long.TryParse(inputs[2], out long x);

        long totalCost = 0;

        //如果b小于3a,那么买三只竹鼠更划算
        if (b < 3 * a) {
            long numForThree = x / 3;
            long left = x % 3;

            //接下来要考虑剩下的竹鼠是一只一只买划算还是直接买满三只划算
            if (left == 0) {
                totalCost = numForThree * b;
            } else {
                long costForOne = left * a;
                long costForThree = b;
                if (costForOne < costForThree) {
                    totalCost = numForThree * b + costForOne;
                } else {
                    totalCost = numForThree * b + costForThree;
                }
            }

        } else {
            //如果b大于等于3a,那么买1只竹鼠更划算
            totalCost = x * a;
        }
        Console.WriteLine(totalCost);
    }
}