#include<bits/stdc++.h>
using namespace std;
int main(void)
{
	int a,b,x;
	int Aml,Bml;
	int i,j;
	int min;
	
	cin>>a>>b>>x;
	Aml=x/1000; Bml=x/500;
	if(x%1000!=0) Aml++;
	if(x%500!=0) Bml++;
	min=(a+b)*(Aml+Bml);
	for(i=0;i<=Aml;i++){
		for(j=0;j<=Bml;j++){
			if(i*1000+j*500<x) continue;
			if(min>i*a+j*b){
				min=i*a+j*b;
				//printf("i=%d j=%d\n",i,j);
			}
		}
	}
	cout<<min<<endl;
	
	return 0;
}
