#include <iostream>
using namespace std;

#define MAX(X,Y) ((X)>(Y)?(X):(Y))

int main(void){
  int a, b, x;
  int ans;
  
  cin >> a >> b >> x;
  x = (x+499)/500;
  if (a>=2*b){
    ans = x*b;
  } else if (a>b){
    ans = x/2*a + x%2*b;
  } else {
    ans = (x+1)/2*a;
  }
  cout << ans << endl;
  return 0;
}
