#include<bits/stdc++.h>
using namespace std;
using ll=long long;
using ull=unsigned long long;
using i128=__int128_t;
using u128=__uint128_t;
using ld=long double;
void solve()
{
ll a,b,x;//注意 不是刚好买到x 买超也行 明白这点 这道题就很简单了 我们算出两种方法每只竹鼠价格的平均值 然后进行比较 贪心购买即可
cin >> a >> b >> x;
if(x==1) cout << a;
else if(x==2) cout << 2*a;
else
{
ld oca=(ld)a,ocb=(ld)b/3;
if(oca<=ocb) cout << a*x;
else
{
ll p1=(x/3)*b+(x%3==0?0:b),p2=(x/3)*b+(x%3)*a;//可以多买一次b 只要价格更低
cout << min(p1,p2);
}
}
}
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
int t=1;
//cin >> t;
while(t--)
{
solve();
}
return 0;
}