#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int af = A * X + B * Y;
  int bf, cf;
  if (X > Y) {
    bf = C * Y + A * (X - Y);
    cf = C * X;
  } else {
    bf = C * X + A * (Y - X);
    cf = C * Y;
  }
  int ans = af;
  if (ans > bf) ans = bf;
  if (ans > cf) ans = cf;
  cout << ans << endl;
}
