#include<bits/stdc++.h>
using namespace std;
#define rep(i,N) for(int (i)=0;(i) < (N); (i)++)
#define all(V) V.begin(), V.end()
using i64 = int_fast64_t;
using P = pair<int,int>;

int main(){
    int A,B,X;
    cin >> A >> B >> X;
    int a = A * (X / 1000 + (!!(X % 1000)));
    int c = A * (X / 1000) + B * ((X % 1000) < 500 ? 1 : 2);
    int b = B * (X / 500  + (!!(X % 500)));
    
    cout << min({a,b,c}) << endl;
}

