#include <iostream>
#include <cstdio>
#include <cstring>
#include <string>
#include <map>
#include <set>
#include <algorithm>
#include <vector>
#include <cmath>
#include <ctime>
#include <queue>
#include <cassert>
using namespace std;

#define rep(i,a,b) for(int i = (a); i <= (b); ++i)
#define per(i,a,b) for(int i = (b); i >= (a); --i)
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define fi first
#define se second
#define SZ(x) ((int)(x).size())

typedef long long ll;
typedef long double ld;
typedef pair<int,int> PII;
typedef vector<int> VI;
typedef pair<PII,int> PIII;

const int N = 2000005;
const int P = 1000000007;
const int INF = 0x3f3f3f3f;
const ll LLINF = 0x3f3f3f3f3f3f3f3f;
const ld eps = 1e-8;

ll qmod(ll a,ll b,ll mod) {ll res=1;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}

//head

//your code goes here


int main()
{
        int a, b, c, x, y; cin >> a >> b >> c >> x >> y;
        if(x > y) swap(x, y), swap(a, b);
        int ans1 = 2*x*c + 2*(y-x)*c;
        int ans2 = 2*x*c + (y-x)*b;
        int ans3 = x*a + y*b;
        cout << min(ans1, min(ans2, ans3)) << endl;
        return 0;
}


/*
int d[N], head[N], tot, n, m;
struct edge
{
        int w, to, nxt;
}; edge e[N << 2];

void init()
{
        tot = 0;
        memset(head,-1,sizeof(head));
}

void add_edge(int u, int v, int w)
{
//        cout << u << ' ' << v << ' ' << w << endl;
        e[tot].w = w, e[tot].to = v, e[tot].nxt = head[u], head[u] = tot++;
}

//O((n+m)logn)
struct cmp{
    bool operator () (int &a, int &b) const{
        return d[a] > d[b];
    }
};
void dijkstra(int s){
    memset(d,INF,sizeof(d));
    priority_queue<int,vector<int>, cmp> q;
    d[s] = 0; q.push(s);
    while(!q.empty()){
        int u = q.top(); q.pop();
        for(int k = head[u]; k != -1; k = e[k].nxt){
            int v = e[k].to;
            if(d[v] > d[u] + e[k].w){
                d[v] = d[u] + e[k].w;
                q.push(v);
            }
        }
    }
}

int main()
{
        while(scanf("%d%d",&n,&m)!=EOF)
        {
                init();
                int from = 0, to = 2*(n-1)*(m-1) + 1;
                for(int i = 1; i <= n; ++i) for(int j = 1; j <= m-1; ++j)
                {
                        int id = (i-1)*(m-1) + j;
                        int u, v, w;
                        scanf("%d",&w);
                        u = i==1 ? from : (2*(i-1)-1)*(m-1)+j;
                        v = i==n ? to : (2*(i-1))*(m-1)+j;
                        add_edge(u, v, w);
                        add_edge(v, u, w);
                }
                for(int i = 1; i <= n-1; ++i) for(int j = 1; j <= m; ++j)
                {
                        int id = (i-1)*(m-1) + j;
                        int u, v, w;
                        scanf("%d",&w);
                        u = j==1 ? to : (2*(i-1))*(m-1)+j-1;
                        v = j==m ? from : (2*(i-1))*(m-1)+j-1+m;
                        add_edge(u, v, w);
                        add_edge(v, u, w);
                }
                for(int i = 1; i <= n-1; ++i) for(int j = 1; j <= m-1; ++j)
                {
                        int id = (i-1)*(m-1) + j;
                        int u, v, w;
                        scanf("%d",&w);
                        u = (2*(i-1))*(m-1)+j;
                        v = (2*(i-1)+1)*(m-1)+j;
                        add_edge(u, v, w);
                        add_edge(v, u, w);
                }
                dijkstra(from);
                cout << d[to] << endl;
        }
        return 0;
}
*/


Measured memory_bytes: 256