#include "bits/stdc++.h"
using namespace std;

int main() {
	int A, B, X;
	cin >> A >> B >> X;
	if (X % 500 == 0) X /= 500;
	else X /= 500, X++;
	if (X % 2 == 0) cout << min(X * B, (X / 2) * A) << endl;
	else cout << min(X * B, (X / 2) * A + min(A, B)) << endl;
}
