#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
vector<pair<ll, int>> factorize(ll n) {
  vector<pair<ll, int>> res;
  for (ll i = 2; i * i <= n; i++) {
    if (n % i) continue;
    res.emplace_back(i, 0);
    while (n % i == 0) {
      n /= i;
      res.back().second++;
    }
  }
  if (n != 1) res.emplace_back(n, 1);
  return res;
}
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
ll ceil(ll a, ll b) { return (a + b - 1) / b; }
const ll INF = LONG_MAX;
template <class T>
inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int ans = 0;
  int num_a = 0;
  int num_b = 0;
  int num_c = 0;
  if ((a + b) < c * 2) {
    num_a = x;
    num_b = y;
  } else {
    num_c = min(x, y) * 2;
    if (x < y) {
      num_b = y - num_c / 2;
    } else {
      num_a = x - num_c / 2;
    }
  }
  cout << num_a * a + num_b * b + num_c * c;
  return 0;
}
