#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using pqg = priority_queue<ll, vector<ll>, greater<ll> >;
using pql = priority_queue<ll, vector<ll> >;
using pqg_p = priority_queue<P, vector<P>, greater<P> >;
using pql_p = priority_queue<P, vector<P> >;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  if (A + B < C * 2) {
    cout << A * X + B * Y << endl;
    ;
    return 0;
  }
  ll res = 0;
  if (X > Y) {
    res += C * 2 * Y;
    X -= Y;
    res += min(C * 2 * X, A * X);
  } else {
    res += C * 2 * X;
    Y -= X;
    res += min(C * 2 * Y, A * Y);
  }
  cout << res << endl;
}
