#include <bits/stdc++.h>
using ll = long long;
template <class T, class S>
void cmin(T &a, const S &b) {
  if (a > b) a = b;
}
template <class T, class S>
void cmax(T &a, const S &b) {
  if (a < b) a = b;
}
using namespace std;
signed main() {
  ll a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  if (a + b <= 2 * c) {
    cout << a * x + b * y << endl;
  } else {
    ll res = min(x, y);
    x -= res;
    y -= res;
    cout << res * 2 * c + (x)*a + (y)*b << endl;
  }
}
