#include <bits/stdc++.h>
using ll = long long;
using namespace std;
constexpr int MOD = 1e9 + 7;
constexpr ll MOD_LL = ll(1e9 + 7);
int main(void) {
  ll a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  ll m = a * x + b * y;
  if (x < y) {
    if (a > b) {
      cout << min({m, 2 * c * y, 2 * c * x + (y - x) * b}) << endl;
    } else if (a <= b) {
      cout << min({m, 2 * c * y, 2 * c * x + (y - x) * a}) << endl;
    }
  } else if (x > y) {
    if (a > b) {
      cout << min({m, 2 * c * x, 2 * c * y + (x - y) * b}) << endl;
    } else if (a <= b) {
      cout << min({m, 2 * c * x, 2 * c * y + (x - y) * a}) << endl;
    }
  } else {
    cout << min(m, 2 * c * x) << endl;
  }
  return 0;
}
