#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  ;
  int totalCost;
  if (A + B >= C * 2) {
    if (min(A, B) >= C * 2) {
      int maxNum = max(X, Y);
      totalCost = C * maxNum * 2;
    } else {
      int leastNum = min(X, Y);
      int costOfA = A * (X - leastNum);
      int costOfB = B * (Y - leastNum);
      int costOfC = C * leastNum * 2;
      totalCost = costOfA + costOfB + costOfC;
    }
  } else {
    totalCost = A * X + B * Y;
  }
  cout << totalCost << endl;
  ;
  return 0;
}
