#include <iostream>

using namespace std;
int main(){
    int a, b, c, x, y;
    cin >> a >> b >> c >> x >> y;
    int cost = 0;
    while(x = 0 || y = 0){
        cost += min(a + b, 2 * c);
        x = x - 1;
        y = y - 1;
    }
    if(y > 0) {
        cost += b * y;
    }
    if(x > 0){
        cost += a * x;
    }
    cout << cost << endl;
    return 0;
}