#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll modseed = pow(10, 9) + 7;
template <typename T>
vector<T> getValues(ll num) {
  vector<T> values(num);
  for (ll i = 0; i < num; i++) {
    cin >> values.at(i);
  }
  return values;
}
string S;
ll A, B, C, K, N, X, Y, cnt;
int main() {
  cin >> A >> B >> C >> X >> Y;
  for (int c = 0; c < (max(X, Y) * 2); ++c) {
    int a, b;
    a = max(0LL, X - c / 2);
    b = max(0LL, Y - c / 2);
    if (c == 0) {
      cnt = a * A + b * B + c * C;
    } else {
      cnt = min(cnt, a * A + b * B + c * C);
    }
  }
  cout << cnt << endl;
  return 0;
  ;
}
