#include "../bits/stdc++.h"
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rem(i, m, n) for (int i = m; i < (n); i++)
#define eps (1e-7)
#define inf (1e9)
#define pi (acos(-1))
typedef long long ll;
typedef vector<int> vi;
typedef vector<long long> vl;
typedef vector<double> vd;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);

    int a, b, c, x, y;
    cin >> a >> b >> c >> x >> y;
    int ab = a + b;
    int c2 = c * 2;
    int ans = 0;
    if (c2 > ab)
        ans = a * x + b * y;
    else
    {
        if (x > y)
        {
            ans = c2 * y;
            ans += min(a, c2) * (x - y);
        }
        else
        {
            ans = c2 * x;
            ans += min(b, c2) * (y - x);
        }
    }

    cout << ans << "\n";

    return 0;
}