#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int ma = max(X, Y);
  int mi = min(X, Y);
  int a1 = ma * C * 2;
  int a2 = mi * C * 2 + (mi - X) * A + (mi - Y) * B;
  int a3 = A * X + B * Y;
  int ans = 1 << 30;
  ans = min(ans, a1);
  ans = min(ans, a2);
  ans = min(ans, a3);
  cout << ans << endl;
}
