#include<iostream>
using namespace std;

int main(){
    int A,B,X;
    cin>>A>>B>>X;
    int sum=0,num=0,ans=0;
    if(A>=2*B){
        while(X>sum){
            sum+=500;
            ans+=B;
        }
        cout<<ans<<endl;
        return 0;
    }else{
        while(X>sum){
            if(X-sum<=500){
                if(A<B){
                    sum+=1000;
                    ans+=A;
                    cout<<ans<<endl;
                    return 0;
                }else {
                    sum+=500;
                    ans+=B;
                    cout<<ans<<endl;
                    return 0;
                }
            }
            sum+=1000;
            ans+=A;
        }
        cout<<ans<<endl;
        return 0;

    }
}
