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