#include<iostream>
#include<cmath>

using namespace std;

int main(){
	long long a,b,c,x,y,sum,ans,t;
	cin>>a>>b>>c>>x>>y;
	if(x<y){
	sum=(y-x)*b+c*x*2;
	ans=y*c*2;
}
else {
	sum=(x-y)*a+y*c*2;
	ans=x*c*2;
}
t=min(ans,sum);
cout<<t<<endl;
	return 0;
}