#include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); vector L(3); for (auto &&e : L) { cin >> e; } int R, B, Y; cin >> R >> B >> Y; int r = 2 * L[0] + 2 * L[2]; int y = 2 * L[1] + 2 * L[2]; int b = 2 * L[0] + 2 * L[1]; int res = r * R + y * Y + b * B; res = min(res, r * Y + R * y + B * b); res = min(res, r * R + B * y + Y * b); res = min(res, r * B + Y * y + R * b); cout << res << '\n'; return 0; }