#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
using namespace std;

int max(int a, int b)
{
    if (a >= b){
        return a;
    }
    else {
        return b;
    }
}

int min(int a, int b, int c) 
{
    if (a <= b) {
        if (a <= c){
            return a;
        }
        else {
            return c;
        }
    }
    else {
        if (b <= c) {
            return b;
        }
        else {
            return c;
        }
    }
}

int main()
{
    int a, b, c, x, y;
    cin >> a >> b >> c >> x >> y;
    long long ans_1, ans_2, ans_3, ans;
    int z;

    ans_1 = a*x+b*y;
    ans_2 = 2*c*max(x,y);

    if (min(x,y,100000) == x) {
        z = b;
    }
    else {
        z = a;
    }
    ans_3 = 2*c*min(x,y,100000) + z*(max(x,y)-min(x,y,100000));

    ans = min(ans_1,ans_2,ans_3);

    cout << ans << endl;

    return 0;
}