#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int INF = 1001001001;
vector<int> to[100005];
int main() {
  double a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  double ans = 0;
  if ((a + b) >= c * 2) {
    if (min({a, b, c}) != c) {
      ans = c * min(x, y) * 2;
      x -= min(x, y);
      y -= min(x, y);
      ans += min(c * max(x, y), a * x + b * y);
    } else {
      ans = c * max(x, y) * 2;
    }
  } else {
    ans = a * x + b * y;
  }
  cout << (int)ans << endl;
  return 0;
}
