#include <bits/stdc++.h>
using namespace std;
int main() {
int x, y, f;
cin >> x >> y >> f;
cout << min(x * 12, y * 12 + f) << '\n';
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpIHsKICAgIGludCB4LCB5LCBmOwogICAgY2luID4+IHggPj4geSA+PiBmOwogICAgY291dCA8PCBtaW4oeCAqIDEyLCB5ICogMTIgKyBmKSA8PCAnXG4nOwp9Cg==