#include <stdio.h>
int main() {
long long a,b,x;
scanf("%lld %lld %lld",&a,&b,&x);
long long cost=0;
//当b>=3*a时
if(b>=3*a) cost=x*a;
//当b<3*a时
else{
cost=x/3*b;
x=x%3;
if(b<=x*a) cost+=b;
else cost+=x*a;
}
printf("%lld\n",cost);
return 0;
}

京公网安备 11010502036488号