#include <bits/stdc++.h>
#include <math.h>
#define rep(i, n) for(int i = 0; i < (n); i++)
#define rrep(i, n) for(int i = 0; i <= (n); i++)
using namespace std;
typedef long long ll;
 
const ll INF = 1LL<<62;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
// 多次元 vector 生成
template<class T>
vector<T> make_vec(size_t a){
    return vector<T>(a);
}
template<class T, class... Ts>
auto make_vec(size_t a, Ts... ts){
  return vector<decltype(make_vec<T>(ts...))>(a, make_vec<T>(ts...));
}

const int MOD = 1000000007;

int main(){
    int A, B, C, X, Y; cin >> A >> B >> C >> X >> Y;

    int ans;

    ans = X*A + Y*B;

    int min_count, max_count, price;
    if (X > Y){
        min_count = Y;
        max_count = X;
        price = A;
    }
    else{
        min_count = X;
        max_count = Y;
        price = B;
    }
    
    ans = min(ans, max_count*2*C);
    ans = min(ans, min_count*2*C + (max_count-min_count)*2*price);

    cout << ans << endl;
}