#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int ans = 0;
  int ave = (a + b) / 2;
  int mi = min(x, y), ma = max(x, y);
  int max_price;
  if (ma == x) {
    max_price = a;
  } else {
    max_price = b;
  }
  if (ave > c) {
    ans += c * mi * 2;
    ans += (ma - mi) * min(max_price, 2 * c);
  } else {
    ans = x * a + y * b;
  }
  cout << ans << endl;
}
