#include <iostream>
#include <algorithm>
using namespace std;
void solve() {
long long a, b, x;
cin >> a >> b >> x;
if (a <= b / 3) {
cout << a * x << '\n';
}
else {
cout << (b * (x / 3) + min(b, a * (x % 3))) << '\n';
}
}
void run() {
int t = 1;
// cin >> t;
while (t-- > 0) {
solve();
}
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
//
run();
}

京公网安备 11010502036488号