#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
int main() {
  long long A, B, C;
  cin >> A >> B >> C;
  long long X, Y;
  cin >> X >> Y;
  long long nothalf = (A * X) + (B * Y);
  long long half = 0, half2 = 0;
  if (X < Y) {
    long long diff = Y - X;
    for (int i = 0, i_len = (X * 2); i < i_len; ++i) half += C;
    for (int i = 0, i_len = (Y * 2); i < i_len; ++i) half2 += C;
    half += B * diff;
  } else if (Y < X) {
    long long diff = X - Y;
    for (int i = 0, i_len = (Y * 2); i < i_len; ++i) half += C;
    for (int i = 0, i_len = (X * 2); i < i_len; ++i) half2 += C;
    half += A * diff;
  }
  cout << min(nothalf, min(half, half2)) << endl;
}
