#include <bits/stdc++.h>
using namespace std;
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;
}
const long long INF = 1e18;
int a, b, c, x, y;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cin >> a >> b >> c >> x >> y;
  long long tmp1 = a * x + b * y;
  long long tmp2 = a * max(x - y, 0) + c * 2 * y;
  long long tmp3 = a * 2 * x + b * max(y - x, 0);
  long long rsl = min(tmp1, min(tmp2, tmp3));
  cout << rsl << endl;
}
