#include<bits/stdc++.h>
using namespace std;
long long extra(int x, int y,int a,int b){
 if(y>x)return (y-x)*b;
 else return (x-y)*a;}
int main()
{
    long long a,b,c,x,y,answer;
    cin>>a>>b>>c>>x>>y;
    answer=max(x,y)*2*c;
    answer=min(answer,min(x,y)*c*2+extra(x,y,a,b));
    answer=min(answer,a*x+b*y);
    cout<<answer<<endl;
    return 0;}
}
