#include <bits/stdc++.h>
using namespace std;
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;
}
const int INF = (1 << 29);
const long long INFL = (1LL << 60);
const double eps = (1e-9);
int main(int argc, char* argv[]) {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int ans = INF;
  for (int i = 0; i <= max(x, y) * 2; i += 2) {
    int tmp = i * c;
    if ((x - i / 2) > 0) tmp += (x - i / 2) * a;
    if ((y - i / 2) > 0) tmp += (y - i / 2) * b;
    chmin(ans, tmp);
  }
  cout << ans << endl;
  return 0;
}
