#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007LL;
const long long INF = 1LL << 60;
using vll = vector<long long>;
using vb = vector<bool>;
using vvb = vector<vb>;
using vvll = vector<vll>;
using vstr = vector<string>;
using vc = vector<char>;
using vvc = vector<vc>;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
constexpr long long TEN(int n) { return (n == 0) ? 1 : 10 * TEN(n - 1); }
long long dx[4] = {0, 1, 0, -1};
long long dy[4] = {1, 0, -1, 0};
int main() {
  long long a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  long long ans = INF;
  for (long long i = 0; i < (2 * max(x, y)); i++) {
    long long yy = y;
    long long xx = x;
    if (i % 2 == 0) {
      yy -= i / 2;
      xx -= i / 2;
    }
    if (yy < 0) yy = 0;
    if (xx < 0) xx = 0;
    chmin(ans, i * c + yy * b + xx * a);
  }
  cout << (ans) << "\n";
}
