#include <bits/stdc++.h>
using namespace std;
double SCALE = 1.0;
double OFFSET_X = 0.0;
double OFFSET_Y = 0.0;
const int IINF = 1 << 28;
const int MOD = 1e9 + 7;
const double INF = 1e30;
const double EPS = 1e-10;
const double PI = acos(-1.0);
const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, -1, 0, 1};
int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int ans = IINF;
  for (int i = 0; i < X + 1; ++i) {
    int a = i;
    int c = max(2 * (X - a), 0);
    int b = max((2 * Y - c + 1) / 2, 0);
    ans = min(ans, a * A + b * B + c * C);
  }
  for (int i = 0; i < Y + 1; ++i) {
    int b = i;
    int c = max(2 * (Y - b), 0);
    int a = max((2 * X - c + 1) / 2, 0);
    ans = min(ans, a * A + b * B + c * C);
  }
  cout << ans << endl;
}
