#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
const ll INF = 1e18;
inline void chmax(ll& a, ll b) { a = max(a, b); }
inline void chmin(ll& a, ll b) { a = min(a, b); }
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int ans = 0;
  if (x >= y)
    ans = c * y + a * (x - y);
  else
    ans = c * x + b * (y - x);
  cout << min((a * x + b * y), ans) << endl;
  return 0;
}
