#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline bool Max(T &x, const T &y) {
  return x < y ? x = y, 1 : 0;
}
template <typename T>
inline bool Min(T &x, const T &y) {
  return x > y ? x = y, 1 : 0;
}
template <typename T>
using V = vector<T>;
template <typename T>
using VV = V<V<T> >;
static const long long MOD = 1e9 + 7;
static const double PI = 3.141592653589793;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  if (a + b <= 2 * c) {
    cout << (a * x + b * y) << '\n';
  } else {
    int ans0 = 0;
    int ans1 = a * x + b * y;
    int ans2 = max(x, y) * c * 2;
    int d, e;
    d = e = 0;
    d = min(x, y) * 2;
    e = max(x, y) - min(x, y);
    if (max(x, y) == a)
      ans0 = a * e + c * d;
    else
      ans0 = b * e + c * d;
    cout << (min(ans0, min(ans1, ans2))) << '\n';
  }
  return 0;
}
