import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
		long a, b, x;
		a = scanner.nextInt();
		b = scanner.nextInt();
		x = scanner.nextInt();
		long c;
		long cost1 = 0;
		long cost2 = 0;
		long cost3 = 0;
		//全用a买
		cost1=a*x;
		//用b买k组,剩余用a补
		cost2=x/3*b+x%3*a;
		//全用b组买,可能多买,也可能更便宜
		cost3=(x/3+1)*b;
		System.out.println(Math.min(Math.min(cost1, cost2), cost3));
    }
}