#include<iostream>
#include<vector>
#include<algorithm>

using namespace std;
using ll = long long;

int main() {
    ll a, b, c, x, y;
    cin >> a >> b >> c >> x >> y;
    if (c < a && c < b) {
        cout << 2 * max(x, y) * c << endl;
    } else if (2*c < a+b) {
        cout << 2 * min(x, y) * c + max(0, (x - y)) * a + max(0, (y - x)) * b;
    } else {
        cout << x * a + y * b << endl;
    }
}
