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