#include <iostream>
#include <algorithm>

using namespace std;

int main() {
    // 1. 必须使用 long long 防止 10^9 * 10^9 溢出
    long long a, b, x;
    if (!(cin >> a >> b >> x)) return 0;

    // 2. 比较 3 只装和 3 个 1 只装哪个更便宜
    if (3 * a <= b) {
        // 1 只装更划算,全部买 1 只装
        cout << x * a << endl;
    } else {
        // 3 只装更划算
        long long groups = x / 3; // 完整 3 只装的数量
        long long rem = x % 3;    // 剩下的零头
        
        // 零头部分:比较 [买 rem 个 1 只装] 和 [直接买 1 组 3 只装]
        long long cost_rem = min(rem * a, b);
        
        long long ans = groups * b + cost_rem;
        cout << ans << endl;
    }

    return 0;
}