#include <iostream>
#include <string>
#include <utility>
#include <algorithm>
#include <map>
#include <vector>
#include <cmath>
#include <cstdlib>

using namespace std;

#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define REPO(i, n) for(int i = 1;i <= n;i++)
#define ll long long
#define INF 1999999999
#define MINF -1999999999

int main() {
	int a,b,c,d = 0;
	cin >> a >> b >> c;
	if (c > 1000) {
		d = c / 1000 * min(a, b * 2);
		c = c % 1000;
	}
	if (c > 500) d += min(a, b * 2);
	else if (c > 0) d += min(a, b);
	cout << d << endl;
}
