#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, c, x, y, price = 0, price1 = 0, price2 = 0;
  cin >> a >> b >> c >> x >> y;
  if ((a > c) & (b > c)) {
    if (x < y) {
      price = 2 * x * c;
      y -= x;
      x = 0;
      if ((2 * c) < b) {
        price = price + y * c * 2;
      } else {
        price = price + y * b;
      }
    } else {
      price = 2 * y * c;
      x -= y;
      y = 0;
      if ((2 * c) < a) {
        price = price + x * c * 2;
      } else {
        price = price + x * a;
      }
    }
  } else if ((c > a) & (c > b)) {
    price = x * a + y * b;
  } else if ((a > c) & (b < c)) {
    price2 = y * b + 2 * c * x;
    price1 = y * b + a * x;
    if (y > x) {
      price = 2 * c * x + (y - x) * b;
    } else {
      price = 2 * c * x;
    }
    if (price1 < price) price = price1;
    if (price2 < price) price = price2;
  } else if ((b > c) & (a < c)) {
    price2 = x * a + 2 * c * y;
    price1 = x * a + y * b;
    if (x > y) {
      price = 2 * c * y + (x - y) * a;
    } else {
      price = 2 * c * y;
    }
    if (price1 < price) price = price1;
    if (price2 < price) price = price2;
  }
  cout << price << endl;
  return 0;
}
