#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B, C, X, Y;
  int greater, smaller, price;
  int cost = 0;
  int cost1 = 0;
  int cost2 = 0;
  cin >> A >> B >> C >> X >> Y;
  if (X > Y) {
    greater = X;
    smaller = Y;
    price = A;
  } else {
    greater = Y;
    smaller = X;
    price = B;
  }
  if (A + B > C * 2) {
    if (A > C && B > C) {
      cost = C * greater * 2;
    } else if (A > C || B > C) {
      cost1 = C * smaller * 2;
      cost1 = (greater - smaller) * price + cost1;
      cost2 = C * greater * 2;
      if (cost1 < cost2) {
        cost = cost1;
      } else {
        cost = cost2;
      }
    } else {
      cost = C * smaller * 2;
      cost = (greater - smaller) * price + cost;
    }
  } else {
    cost = A * X + B * Y;
  }
  cout << cost << endl;
}
