#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void chmax(T& a, T b) {
  if (a < b) {
    a = b;
  }
}
template <class T>
inline void chmin(T& a, T b) {
  if (a > b) {
    a = b;
  }
}
template <class T>
inline T gcd(T x, T y) {
  if (y == 0) {
    return x;
  } else if (x == 0) {
    return y;
  }
  return gcd(y, x % y);
}
template <class T>
inline T lcm(T x, T y) {
  return (x * y) / gcd(x, y);
}
template <class T>
inline void print_vector(vector<T> vec) {
  for (int i = 0; i < vec.size(); i++) {
    cout << vec[i] << " ";
  }
  cout << endl;
}
const long long MOD = 1e9 + 7;
const long long LLINF = 1LL << 60;
const int INF = 1 << 30;
const int DEADLINE = 60 * 8 + 59;
int main(void) {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int patternA = A * X + B * Y;
  int patternB = 0;
  if (A - C >= B - C) {
    patternB = C * (X * 2) + B * max(0, Y - X);
  } else {
    patternB = C * (Y * 2) + A * max(0, X - Y);
  }
  int patternC = C * 2 * max(X, Y);
  cout << min({patternA, patternB, patternC}) << endl;
  return 0;
}
