#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vll = vector<long long>;
using sll = set<long long>;
template <typename T>
T gcd(T a, T b) {
  return b ? gcd(b, a % b) : a;
}
template <typename T>
T lcm(T a, T b) {
  return a * b / gcd(a, b);
}
int main() {
  ll a, b, c, x, y;
  ll p, ans;
  cin >> a;
  cin >> b;
  cin >> c;
  cin >> x;
  cin >> y;
  if (2 * c < a + b) {
    if (x < y) {
      ans = c * x * 2;
      if (2 * c < b) {
        ans += c * (y - x);
      } else {
        ans += b * (y - x);
      }
    } else {
      ans = c * y * 2;
      if (2 * c < a) {
        ans += c * (x - y);
      } else {
        ans += a * (x - y);
      }
    }
  } else {
    ans = a * x + b * y;
  }
  cout << ans << '\n';
  return 0;
}
