#include<iostream>
#include<cstdio>
#include<cstring>
#include<string>
#include<cmath>
#include<queue>
#include<algorithm>
#include<vector>
#include<stack>
#define INF 0x3f3f3f3f
#define eps 1e-6
typedef long long ll;
const double pi=acos(-1.0);
using namespace std;
int main()
{
    int a,b,c,x,y,an1,an2,an3;
    cin>>a>>b>>c>>x>>y;
    an1=a*x+b*y;
    if(x>y)
    {
        an3=x*2*c;an2=(y*c*2+(x-y)*a);
    }
    else
    {
        an2=(x*c*2+(y-x)*b);an3=y*2*c;
    }
    int ans=min(an1,min(an2,an3));
    cout<<ans<<endl;
	return 0;
}